digital content lasts forever. — or five years, whichever comes first.
~Jeff Rothenberg, 1999

folderHorizon


folderHorizon is a standalone program that reads the files contained in your folders and generates a publication in static HTML format. The result can be read either offline or online as a website and being static it is independent of databases or server-side scripting languages. This is a sustainable approach to preserve and easily distribute your content.

folderHorizon is designed for non-programmers and for anyone who needs to consolidate their digital content into a readable and durable format.
No-Code! The programming is just to organize folders and files and anyone with a computer is familiar with this primary archiving approach. folderHorizon does all the rest of the work.

Wild Start


Just run folderHorizon executable in its folder...

[1] Mac users info

Content


Common usage

Environment

Asset and design development

top

Common usage

Program interface


The real interface of the program is the folders where you develop the content structure.
The folderHorizon terminal consists of a simple menu that allows you to select actions and archives by typing a character or number then press Enter.

Main commands

When archive content is modified, press 'Enter' to update and view changes on page.

Other commands and options

An example with a working one and many archives

 ===========================================        
 folderHorizon

    Working on 'My Siberia' (456 MB)
    ========================================
    v : View/Edit pages
    r : Release the final archive
        ====================================
        c : Enable empty caption files

    3 other archives to build
    ========================================
    1 : Hugo Brain Website (3 MB)
    2 : Wordpress Headache (701 MB)
    3 : Wrong Photos (68 MB)

    ========================================
    n : Create a new archive
    q : Quit the program

    ========================================
              Type a command and press Enter
    :v

While editing HTML/Text in browser after build

===========================================          
* Open your archive directory to add      *
* folders, files, captions and tags.      *
*                                         *
* When you are done with the edits, type: *
* 'r' to release the final archive        *
* 'q' to quit the program                 *
===========================================
                         ...and press Enter
:r

On archive folders/files changes...

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      The Archive has been modified.
      Press Enter to updare changes!
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                     

top

The archive folder/s


There are two levels of folder in the archive directory: sections/ contain projects/ and projects/ contain their files and captions. Unicode characters are supported in sections, projects folders and filenames.

Supported files


  * image    jpg|jpeg|jpe|png|tif|tiff|bmp|pict|webp|gif|svg
  * video    mp4|avi|mpg|mpeg|mkv|oggvideo|mov|3gp|webm|wmv|flv
  * audio    mp3|flac|wav|aif|aiff|ogg|m4a|aac
  * document any downloadable except for ones above and .txt files reserved for captions

Example folders scheme

All Animals (archive folder) Homepage figure (any supported file: image/video/audio + its caption file) Cats (section folder) White Cats (project folder) Black Cats (project folder) Other Cats (project folder) files... files... files... ... Dogs (section folder) Big Dogs (project folder) Small Dogs (project folder) files... files... ...

The name of 'sections' and 'projects' folders it is used by the program to build menus with links to the content. You can make as many sections and projects as you want.

The files are read only at second level of project folders, files in section folder will be ignored by the program.

The image files are resized (if needed) and converted to .jpg format. Video and audio are converted to .mp4 and .mp3 format. The .ogg format can be audio or video, for files ogg/video the extension must be renamed to .oggvideo. Animated .webp images are not supported.
The .txt files are used for captioning files an they are not considered as document files.

Sorting folders and files

folderHorizon reads your archive tree in alphabetical order. You can change the order of folders and files by adding a prefix to their name. The prefix is a number followed by an hash symbol, example:

	1 # Your file or folder name
	2 # Another file or folder name
	| it forces 'Another...' after 'Your...'

Leading zero numbers, 01, 001, 02 etc. and whitespaces before/after the hash symbol are allowed. The building trims the prefix keeping your sorting.

Files caption

Any file can have a text caption with title and description.
By default folderHorizon creates an empty .txt file for each file in the same folder.
The caption file has the same name (extension included) as the file it describes.
Example:

	MyImageFile.jpg 	(your file)
	MyImageFile.jpg.txt 	(caption of file)

Open the .txt caption with a simple text editor:

	The first line is the title
	The other lines are the
	description of file content...

Video poster/preview image

folderHorizon automatically tries to extract the preview image from your video files.
If it doesn't succeed, or if you do not like the result, you can set your .jpg image in the same folder of video using a strategy similar to the captions:
name the image with the same name of your video (extension included) adding the suffix -videoposter.jpg

	MyVideoFile.avi 			(your video)
	MyVideoFile.avi-videoposter.jpg 	(video poster/preview)
	MyVideoFile.avi.txt 			(caption of video, optional)

Search and tags

The Search finds the text occurrences the HTML/Text pages, in the file captions and in the [tags].txt files.
You can create a file named [tags].txt and write your tags/keywords in any context/folder. example: #wild#badgers#foxes#wolves

The search input accepts multiple words using the pipe character | a separator,
example: motorcycle|helicopter

top

Environment

Requirements


top

Configuration files


folderHorizon creates the program and the archives configuration files with default values ​​that can be modified. Configuration .json files contain "Key": "Value" data and they are editable with a simple text/code program. Just be careful not to break the double quotes and commas.

archive.json

The configuration file created in each archive folder contains your archive preferences that you can customize.

Example with | notes

{
  "ArchiveName": "Archive Name",
  "ArchiveDescription": "The description of this archive",
  "ArchiveKeywords": "A list of keywords about content",
  "ArchiveAuthor": "Your Name?",
	| All self-explaining HTML page metadata
  "ImageResizeHeight": "1200",
  "ThumbnailHeight":    "400",
	| If needed, images are resized by pixel height. Just set your size
  "MP3Bitrate": "192",
	| Audio quality conversion, low to high: 96|128|160|192|224|256|320
  "AudioWaveFormColor": "#333333",
	| The color of the audio waveform generated image
	| See class '.audio' in 'resources/build/asset-default/theme/main.css' file
  "AssetDirectory": "asset-default"
    | The 'asset' directory name (see asset and design development)
}

folderHorizon.json

The program configuration file created in the program directory it defines the environment directory paths and the editor service port.
If you change the location or the name of the working directories, you need to modify the value of paths. Important: do not use whitespaces in path names.

Example

{
	"ArchivesPath": "/Users/*yourname*/folderHorizonArchives",
	"ReleasesPath": "/Users/*yourname*/folderHorizonReleases",
	"EditorPort": "8080",
	"FFmpegPath": "resources/ffmpeg/ffmpeg"
}

The "ArchivesPath" key contains the path to working archives folders.
The "ReleasesPath" path will be created for finally released archives.
Both paths can be set to use an external drive.
It is recommended not to use whitespace characters in the paths.

The "EditorPort" 8080 should be ok by default. In case of problems, you can set 8000/9000/9090 etc.
The editor service allows to write your HTML/Text for any generated page.
The texts are contextually saved in the source archive folder in files named [text].html
The service also monitors the archive changes, so don't close the program while working.

The "FFmpegPath" key contains the path to the default static ffmpeg executable.
See FFmpeg chapter for more info.

top

FFmpeg


folderHorizon uses a static version (7.0.1) of FFmpeg for image resizing and file conversion. It also creates video poster/preview and waveform pictures of audio files.
The ffmpeg static binary file is downloaded/extracted in resources/ffmpeg/ from:

We sincerely wish these three people and urls a long long life.

If you have FFmpeg already installed in your system you can use it by editing the path in folderHorizon.json configuraton file.

top

Troubleshooting


* Mac users need to force folderHorizon and resources/ffmpeg/ffmpeg executables because they are detected as "from an unidentified developer". Just convince your Mac that as the owner, you decide.

* Any report of malfunction is welcome and will be evaluated as soon as possible.
If you think you have a malfunction while updating changes in the archive, there is an easy way to reset the building/updating:


* Do not open the archive links in "new browser tab" during the developement.
It affects the status/changes script.
The 'Search' page has no status/changes script so it opens result links in "new browser tab".
Is suggested to close the multiple tabs result when you modify the archive folders/files.

top

License


The folderHorizon asset theme and templates are public domain (PD)

Generally, the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

top

Asset and design development

Theme


If you are familiar with the CSS language it is quite easy to modify the graphic design.
The resources/build/asset-default/theme directory contains the .css files used in HTML pages:

* Make a copy of the asset-default directory and name it my-asset (eg).
* Modify your archive.json file: "AssetDirectory": "my-asset".
* Modify the theme/templates content and remember to backup your asset folder!

The asset-default directory also contains:

The javascript CKEditor up one directory is used only for editing HTML/Text during the archive development. The final release is not editable and it not included in it.

top

Templates


The directory asset-default/templates/ contains the *.tpl files used to build the HTML the index.html pages. folderHorizon reads the template files replacing three types of patterns:

1. {@_TPL_* Nested templates
2. [@_*     Data contained in archive.json configuration file
3. (@_*     Archive content and HTML required data


1. Nested templates scheme

global_header.tpl =>
	{@_TPL_TOPNAV_ITEMS_@} loads array:
		global_nav_item.tpl +
		global_nav_items_extra.tpl [1] +
		global_nav_search.tpl

	page home.tpl =>
		{@_TPL_HOME_FILE_@} loads homepage figure file:
			home_file_image.tpl or
			home_file_video.tpl or
			home_file_audio.tpl
		{@_TPL_EDITOR_@} [2] loads:
			global_editor.tpl

	page search.tpl [3]

	page section.tpl =>
		{@_TPL_SIDENAV_@} loads wrapper:
			sidenav_common.tpl =>
				{@_TPL_SIDENAV_ITEMS_@} loads array:
					global_nav_item.tpl
		{@_TPL_SECTION_ITEMS_@} loads array:
			section_item.tpl
		{@_TPL_EDITOR_@} [2] loads:
			global_editor.tpl

	page project.tpl
		{@_TPL_SIDENAV_@} loads wrapper:
			sidenav_common.tpl =>
				{@_TPL_SIDENAV_ITEMS_@} loads array:
					global_nav_item.tpl
		{@_TPL_GALLERY_@} loads wrapper:
			project_gallery.tpl =>
				{@_TPL_GALLERY_ITEMS_@} loads array:
					project_gallery_item.tpl
		{@_TPL_VIDEO_ITEMS_@} loads array:
			project_video_item.tpl
		{@_TPL_AUDIO_ITEMS_@} loads array:
			project_audio_item.tpl loads array:
		{@_TPL_EDITOR_@} [2] loads:
			global_editor.tpl
		{@_TPL_DOCUMENT_WRAPPER_@} loads wrapper:
			project_document_wrapper.tpl =>
				{@_TPL_DOCUMENT_ITEMS_@} loads array:
					project_document_item.tpl

	global_status.tpl [4]

global_footer.tpl



[1] The template 'global_nav_items_extra.tpl' (empty by default)
allows to append items/links to the main topbar menu.
See 'global_nav_items_extra.Readme.txt 'file for details.
[2] The template 'global_editor.tpl' (javascript HTML/Text editor) is not loaded in release.
[3] The 'search' page does not load 'global_status.tpl' javascript.
[4] The template 'global_status.tpl' (javascript changes monitor) is not loaded in release.



2. Data contained in 'archive.json' configuration file

[@_ARCHIVE_NAME_@]        "ArchiveName" value (the archive name as title)
[@_ARCHIVE_DESCRIPTION_@] "ArchiveDescription" value
[@_ARCHIVE_KEYWORDS_@]    "ArchiveKeywords" value
[@_ARCHIVE_AUTHOR_@]      "ArchiveAuthor" value



3. Archive content and HTML required data


Content

(@_PAGE_TITLE_@) The title of page
(@_PAGE_TEXT_@) The [text].html files content

(@_FILE_TITLE_@) and (@_FILE_DESCRIPTION_@) File title and description from *.txt caption files
	(@_FILE_CAPTION_@) The sum of the two above

(@_FILE_GALLERY_REF_@) Full size image source file reference
	(@_FILE_GALLERY_WIDTH_@) and (@_FILE_GALLERY_HEIGHT_@) Full size image required size
(@_FILE_THUMBNAIL_REF_@) Thumbnail image source file reference
(@_FILE_REF_@) Video, audio and document source file reference
(@_FILE_POSTER_REF_@) Video 'poster/preview' image source file reference (generated or custom)
(@_FILE_WAVEFORM_REF_@) Audio waveform image source file reference (generated)
(@_FILE_NAME_@) Downloadable document file name

(@_PROJECT_REF_@) Link to project in 'sections' pages
	(@_PROJECT_NAME_@) Text of link
	(@_PROJECT_IMAGE_REF_@) Image source file reference of project


Navigators

(@_NAV_REF_@) Link to relative index.html page
	(@_NAV_NAME_@) Page name
	(@_NAV_SELECTION_@) Current/selected page (css)


Paths

(@_HOME_REF_@) Homepage link/reference
(@_BACK_REF_@) Parent references: ../../ etc.
(@_ASSET_DIR_@) The 'asset' directory name


Var

(@_HEADER_CONTEXT_CLASS_@) Defines the page context: homepage/archive (css)

(@_PAGE_TEXT_FILE_@) JS editor. The path to [text].html file in source archive
(@_PAGE_INDEX_FILE_@) JS status. The path to index.html file in build directory
(@_SERVICE_PORT_@) JS editor and status. The local service port



(c) LL 2024