Skip to content

Commit

Permalink
Merge pull request #2 from Laim/dev-branch
Browse files Browse the repository at this point in the history
- Change Drag and Drop to accept folder and change txtRoot to the dragged directory, see issue [#1](#1)
- Split Models.cs out to separate class files
- Created EULA.md
- Created HELP.md
- Updated README.md
- Created VERSIONS.md (legacy versions)
- Updated F1 link in frmMain
- Started adding some temporary comments so I know what is what
- Changed donate button so it specifies who its going to (RL Vision)
- Changed Laim link to Snap2HTML-NG
  • Loading branch information
Laim authored Sep 21, 2023
2 parents 0863908 + effdd4a commit 6805085
Show file tree
Hide file tree
Showing 15 changed files with 1,011 additions and 985 deletions.
2 changes: 2 additions & 0 deletions EULA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# EULA
RL Vision in case of Snap2HTML, or Laim McKenzie in case of Snap2HTML-NG, can not be held responsible for any damages whatsoever, direct or indirect, caused by this software or other material from RL Vision in case of Snap2HTML, or Laim McKenzie in case of Snap2HTML-NG.
120 changes: 120 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Search
The built in search box accepts the following modifiers:

Wildcards \* and ? can be used. \* matches zero or more characters. ? matches exactly one character.

Prefix your search with > to search only the current folder. >> searches the current folder and its sub folders.

**Tip**: Search for \* to list all files. This is especially useful together with the export functionality to get all data out of the html file.

# Search Pattern
The Search Pattern in the GUI is a new feature to Snap2HTML-NG. This allows you to only pull files that match a certain cirteria. Similar to the Search function in the HTML file;

Wildcards \* and ? can be used. \* matches zero or more characters in that position. ? matches exactly one character in that position.

Characters other than the wildcard are literal characters. The Search Pattern "\*w" searches for all file names in the path ending with the letter "W". The Search Pattern "l\*" searches for all file names beginning with the letter "L".

Note due to how .NET Framework is designed, if you use an aserisk wild card for specifying file types, such as "\*.mp4", this will return files with extensions that match and _begin_ with mp4. If you use the ? wildcard somewhere within the search pattern, it will resolve this issue.

For example using "\*.txt" will return "\*.txt, \*.txtt" etc.

# File Linking

Linking allows you open the listed files directly in your web browser. This is designed to be flexible, which also sometimes makes it tricky to get right.

Only files can be linked. Folders are automatically linked to browse the path in the snapshot.

Different browsers handle local links in different ways, usually for security reasons.

For example, Internet Explorer will not let you open links to files on your local machine at all. (*You can however copy the
link and paste into the location field.*)

Here are some examples that shows how to use it:

## Link to fully qualified local path
**Root folder**: "c:\my_root\"

**Link to**: "c:\my_root\"

**Use snapshot from**: [anywhere locally]

## Link to relative local path
**Root folder**: "c:\my_root\"

**Link to**: "my_root\"

**Use snapshot from**: "c:\snapshot.html"

## Link to same folder as snapshot is saved in
**Root folder**: "c:\my_root\"

**Link to**: [leave textbox empty]

**Use snapshot from**: "c:\my_root\snapshot.html"

## Link to a web server with mirror of local folder
**Root folder**: "c:\my_www_root\"

**Link to**: "http://www.example.com/"

**Use snapshot from**: [anywhere]

## Link to a relative path on a web server with mirror of local folder
**Root folder**: "c:\my_www_root\subfolder"

**Link to**: "subfolder/"

**Use snapshot from**: "http://www.example.com/snapshot.html"

# Command Line
You can automate Snap2HTML by starting it from the command line with the
following options:

## Simple
Snap2HTMl.exe "c:\path\to\root\folder"

**Note**: Starts the program with the given root path already set

## Full

Snap2HTMl.exe -path:"root folder path" -outfile:"filename" [-link:"link to path"] [-title:"page title"] [-hidden] [-system] [-silent]

### Paramters

-path:"root folder path" - The root path to load.

**Example**: -path:"c:\temp"

-outfile:"filename" - The filename to save the snapshot as. Don't forget the html extension!

**Example**: -outfile:"c:\temp\out.html"

-link:"link to path" - The path to link files to.

**Example**: -link:"c:\temp"

-title:"page title" - Set the page title. If omitted, title is generated based on path.

-hidden - Include hidden items

-system - Include system items

-silent - Run without showing the window (only if both -path and -outfile are used)

**Notes**:

When both -path and -outfile are specified, the program will automatically start generating the snapshot, and quit when done.

Always surround paths and filenames with quotes ("")!

In silent mode, in case or error the program will just quit without telling why.

Do not include the [square brackets] when you write your command line. (Square brackets signify optional command line parameters)

# Template Design
If you know html and javascript you may want to have a look at the file "template.html" in the application folder. This is the base for the output, and you can modify it with your own enhancements and design changes.

If you make something nice you are welcome, to send it to me and I might distribute it with future versions of the program or add a link below!

- Showcases:
- Amstrad CPC Memory Engraved: https://acpc.me (Amazing!)
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,38 @@

This application is a modified version of [Snap2HTML](https://github.com/rlv-dan/Snap2HTML) by RL Vision.

Snap2HTML takes a "snapshot" of the folder structure on your harddrive and saves it as an HTML file. What's unique about Snap2HTML is that the HTML file uses modern techniques to make it feel like a "real" application, displaying a treeview with folders that you can navigate to view the files contained within.
Snap2HTML-NG takes a "snapshot" of the folder structure on your Hard Drive or Network Drive and saves it as an HTML file.

There is also a built in file search and ability to export data as plain text, csv or json. Still, everything is contained in a single HTML file that you can easily store or distribute.
What's unique about Snap2HTML-NG is that the HTML file uses modern techniques to make it feel like a real File Explorer, displaying a treeview with directories that you can navigate to view the files contained within.
There is also a built-in file search and ability to export data as plain text, CSV, or JSON. Everything is contained in a single HTML file that you can easily store or distribute.

Snap2HTML-NG file listings can be used in many ways. An example of some is:

- As a complement to your backups (**this is not a backup solution**).
- You can also keep a file list of external HDDs and other computers; in case you need to look something up or to save for historic reasons and documentation.
- Helping friends or family with Troubleshooting, you can ask them to send a snapshot of their directories so you can better understand their problem.

It's up to you to decide what Snap2HTML-NG can be used for!

## Screenshots

WinForms application for generating the direcotry listings:

<img src="https://github.com/Laim/Snap2HTML-NG/assets/14845036/4d8915f7-7dbb-4994-8059-3942710f3f9b">
[![Screenshot of Application](https://github.com/Laim/Snap2HTML-NG/assets/14845036/4d8915f7-7dbb-4994-8059-3942710f3f9b)]

The finished HTML app:

<img src="https://github.com/Laim/Snap2HTML-NG/assets/14845036/a7a1ed83-93e3-46e2-a40c-c9b31e2d8412">
[![Screenshot of HTML output](https://github.com/Laim/Snap2HTML-NG/assets/14845036/a7a1ed83-93e3-46e2-a40c-c9b31e2d8412)]

## Snap2HTML-NG Changes

This is some of the changes so far.

- Search Pattern filtering on Scan
- Writable Directory Path Textbox
- Writable Directory Path Textbox
- Project upgraded to .NET Framework 4.8
- Drag and Drop Optimization

## Privacy Notice

Snap2HTML-NG does not connect to the internet. It does not phone home, check for updates, submit telemetry, spy on you or any other crap like that. It simply doesn't do anything behind your back and any data related to the program is yours. As it should be.
Loading

0 comments on commit 6805085

Please sign in to comment.