Commit Graph

6 Commits

Author SHA1 Message Date
Matt Mascarenhas ce9a0e7635 Prevent file clashes
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.
2020-05-17 22:50:28 +01:00
Matt Mascarenhas 9dfdc117be Fix search_ and player_location related bugs
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.
2020-05-17 02:04:26 +01:00
Matt Mascarenhas e2ea8fdaf3 cinera.c: Memorable Templates
• 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__
2020-05-15 02:35:55 +01:00
Matt Mascarenhas 33e590c6da cinera_config.c: Prevent read access crash
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.
2020-05-10 21:25:05 +01:00
Matt Mascarenhas c883bbb971 cinera_config.c: Remove extraneous #endif 2020-05-09 19:16:57 +01:00
Matt Mascarenhas 05518781c4 cinera.c: Config
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__
2020-05-09 18:33:25 +01:00