It was just a typo. HMMLToBuffers() passed the global config pointer,
rather than the passed in one, to GenerateNavigation().
Also switch the entire config over to use memory_book style allocation.
This saves us from having to offset pointers when memory gets realloc'd.
Config parsing now errors-out when it detects clashes between:
base_dir and search_location, and global_search_dir
base_dir and player_location
This prevents us from generating search / project pages of multiple
projects (incl. global_search_dir) at the same location, which would
screw up the asset landmarks.
This change makes GenerateGlobalSearchPage() pass the Config to
BuffersToHTML(), which in turn passes it on to GenerateNavigation(),
thus preventing a null-pointer deference when setting the Theme.
It also fixes the filter by using all three of baseURL, searchLocation
and playerLocation to associate the filter and index elements.
On the search pages use the search_location and player_location, in
addition to the base_url, to associate filter and index entries, such
that the filter actually works.
Fix the .index file location for projects with a search_location. As
this is now consistent, we happen to fix a crash that happened when
changing the search_location.
New config option:
deny_bespoke_templates
Indexers may use the "template" attribute in the video node of
an .hmml file to set a bespoke template for that entry,
superseding any configured player_template. Setting
"deny_bespoke_templates" to true prevents this.
• Pack all templates before sync'ing the projects
• Delay generation of navigation bars until BuffersToHTML(), and free them
when switching projects
• Change many variably-lengthed items to use memory_book
• Do not push on multiple support scopes with the same ID
• Prevent crash when trying to snipe an asset checksum into an HTML file
we were never permitted to create
• Reorganise ReadFileIntoBuffer() and related functions into cinera.c
New Template Tags:
__CINERA_GLOBAL_NAV__
Passing an empty string to StripSlashes() would crash.
Also add a conditional around the ctime calls in the Won Build System,
to only run it if it exists.
Previously we only printed deletion in DeletePlayerPageFromFilesystem().
If, however, the output parameter is set in a .hmml file, we needn't
delete that page from filesystem. What would happen is, we move the
file from one location (delete) to another (insert / append), and only
printed out the insertion / append. This gave the impression that the
old database entry remained, when it had correctly been deleted.
Database version 5
Major features:
Config file parsing
Multiple projects per instance
Searching across multiple projects
Art sprites, usable by project, medium and support
Minor features:
The search results are now sortable
Optimised the search page sorting
Fixes:
More reliable file system monitoring
Well-formed templates are now valid, even with the absence of assets
Correctly resove ~ in paths
Gracefully handle the lack of an internet connection
Renamed "annotator" to "indexer"
Removed PlayerURLPrefix, in favour of .hmml "output" parameter
Replaced the flags collection with:
-0 Dry-run mode
-c Set the config file path
-e Examine the database
-v Print version
-h Print help
New template tags:
__CINERA_NAV__ dropdown
__CINERA_NAV__ horizontal
__CINERA_NAV__ plain
__CINERA_PROJECT_PLAIN__
Deleted template tags:
__CINERA_MENUS__
__CINERA_SCRIPT__
It seems that rsync triggers these events, so we must handle these in
addition to the IN_CLOSE_WRITE ones triggered by re-saves.
Also fix MakeDir() to correctly make parent directories (i.e. mkdir -p).
Previously we had a template tag limit of 16. This commit lifts that
limit to support "unlimited" tags per template.
Skip already offset landmarks most efficiently when adding a new asset.
New template tags:
__CINERA_SEARCH_URL__
__CINERA_VOD_PLATFORM__
Database version 4
Revving resources involves hashing asset files and appending a query
string to their URLs. Additionally we monitor asset files for changes
and edit their new checksum hash into all HTML files citing them.
This commit also introduces new template tags for assets (listed below)
with which you may instruct Cinera to rev assets of your choice. There
is further information about this in the help (-h) and the README.md
Amongst other minor changes, we now support unset $XDG_CACHE_HOME and
$HOME
- Thanks to insofaras for wordexp()
New flags:
-Q Set query string
New template tags:
__CINERA_ASSET__
__CINERA_CSS__
__CINERA_IMAGE__
__CINERA_JS__
Renamed template tag:
__CINERA_SEARCH__ (was __CINERA_INDEX__)
Previously it could fail to generate an index if the processing of the
final file set "Inserted" or "Deleted" to FALSE, even if a prior file
had set it to TRUE