migrate wiki

j 2023-07-02 12:57:13 +05:30
parent b0632723e7
commit 537d4ab5b9
32 changed files with 1997 additions and 0 deletions

155
API.md Normal file

@ -0,0 +1,155 @@
## API
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
### Documentation
Each instance of Pan.do/ra comes with its build in API documentation. You find it by navigation to /api/ with a browser.
I.e. current API can be found at <http://0xdb.org/api/>
### Using the API
To use the API you can use Ox.App if you use Ox.js, or look at [pandora_client](https://wiki.0x2620.org/browser/pandora_client/pandora_client/*init*.py#L331) for how this can be used from python. Eventually we hope to describe this section in more detail.
### Examples
#### PHP
```
<?php
class API {
function __construct($url) {
$this->url = $url;
}
public function _request($action, $data) {
$content = array(
'action' => $action,
'data' => json_encode($data)
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($content),
),
);
$context = stream_context_create($options);
$result = json_decode(file_get_contents($this->url, false, $context));
return $result;
}
}
l
$api = new API('http://archive.arabdigitalexpression.org/api/');
$result = $api->_request('find', array(
"query"=>array(
"conditions"=>array(array("key"=>"*", "value"=>"paris", "operator"=>'='))
),
"keys"=>array("title", 'id'),
"range"=> array(0, 10),
"sort"=>array(array("key"=>"title", "operator"=>"+"))
));
var_dump($result);
```
#### JavaScript
```
<!DOCTYPE html>
<html>
<head>
<script>
function pandora_api(action, data, callback) {
var url = 'http://archive.arabdigitalexpression.org/api/';
$.ajax({
type: "POST",
url: url,
data: {action: action, data: JSON.stringify(data)},
success: callback,
dataType: 'json'
});
}
function pandora_api(action, data, callback) {
var url = 'http://archive.arabdigitalexpression.org/api/';
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', function (evt) {
var data = JSON.parse(evt.target.responseText);
callback(data);
});
var formData = new FormData();
formData.append('action', action);
formData.append('data', JSON.stringify(data));
xhr.open('POST', url);
xhr.send(formData);
}
pandora_api('find', {query: ....}, function(result) {console.log(result)});
</script>
</head>
<body>
</body>
</html>
```
Or using OxJS
```
<!DOCTYPE html>
<html>
<head>
<script src="https://oxjs.org/build/Ox.js"></script>
<script>
Ox.load({
UI: {
loadCSS: false
}
}, function() {
Ox.API({
url: "https://0xdb.org/api/"
}, function(api) {
console.log(api);
});
});
</script>
<body>
</body>
</html>
```
#### Python
Using python-ox (install with **easy_install ox**)
```
import ox
api = ox.API('http://archive.arabdigitalexpression.org/api/')
item = api.find({'query':{conditions:[{'key': '*', 'value':'test', 'operator':'='}], 'operator':'&'}, 'keys': ['location']})
```
Add all items in list 'j:Example' to groups a, b and c
```
#!/usr/bin/python
import ox
username=ADD_USER
password=ADD_PASSWORD
groups = ['a', 'b', 'c']
list_id = 'j:Example'
api = ox.API('http://kjc-sv030.kjc.uni-heidelberg.de/api/')
api.signin(username=username, password=password)
for i in api.find({'query': {
'conditions': [{'key': 'list', 'value': list_id}]},
'keys': ['id', 'groups'],
'range': [0, 10000]
})['data']['items']:
if i['groups'] != groups:
print id
api.edit({'id': i['id'], 'groups': groups})
```

43
DatabaseUpdate.md Normal file

@ -0,0 +1,43 @@
## Upgrading Database to South
first time you update from a version without South you have to manually sync your db and after that initialize your database and fake all previous south transactions:
1. if your repositroy revision is below 2327, you want to update to 2327, migrate to south and update to latest version after that
```
bzr pull -r2327
cd src/python-ox
bzr pull
```
2. manualy sync database to current layout(see below)
3. make sure south is installed
```
cd /srv/pandora
./bin/pip install South
```
4. sync south db
```
cd /srv/pandora/pandora
./manage.py syncdb
```
5. populate south history
```
./manage.py migrate --all --fake
```
## Manually Syncing Database
First check for changes in the database:
```
cd /srv/pandora/pandora
./manage.py sqldiff -a
```
If you have any you can pipe the diff into dbshell to apply them. make sure nothing gets dropped that contains data.
```
cd /srv/pandora/pandora
./manage.py sqldiff -a | ./manage.py dbshell
```
Sometimes it is required to set defaults for rows. In that case you have to open dbshell and set them manually:
```
./manage.py dbshell
UPDATE archive_file SET info = '{}' WHERE info IS NULL;
UPDATE archive_file SET path_info = '{}' WHERE path_info IS NULL;
```

126
IMDb.md Normal file

@ -0,0 +1,126 @@
## IMDb Parser
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
Open Issues:
* some feelds need html stripped, others not
* tv shows have " around title
* lists of type, i.e. release_date can be a list of dates with current parser
this is now implemented in python-ox
[see here](http://code.0x2620.org/python-ox/annotate/head%3A/ox/web/imdb.py)
```
{
'cast': {
'page': 'combined',
're': '<td class="nm">.*?>(.*?)</a>.*?<td class="char">(.*?)</td>',
'type': 'list'
},
'cinematographers': {
'page': 'combined',
're': [
'Cinematography by</a>(.*?)</table>',
'<a href="/name/.*?/">(.*?)</a>'
],
'type': 'list'
},
'countries': {
'page': 'combined',
're': '<a href="/Sections/Countries/.*?/">(.*?)</a>',
'type': 'list'
},
'directors': {
'page': 'combined',
're': [
'Directed by</a>(.*?)</table>',
'<a href="/name/.*?/">(.*?)</a>'
],
'type': 'list'
},
'editors': {
'page': 'combined',
're': [
'Film Editing by</a>(.*?)</table>',
'<a href="/name/.*?/">(.*?)</a>'
],
'type': 'list'
},
'filming_locations': {
'page': 'locations',
're': '<a href="/search/title\?locations=.*?">(.*?)</a>',
'type': 'list'
},
'genres': {
'page': 'combined',
're': '<a href="/Sections/Genres/.*?/">(.*?)</a>',
'type': 'list'
},
'keywords': {
'page': 'keywords',
're': '<a href="/keyword/.*?/">(.*?)</a>',
'type': 'list'
},
'languages': {
'page': 'combined',
're': '<a href="/Sections/Languages/.*?/">(.*?)</a>',
'type': 'list'
},
'poster_id': {
'page': 'combined',
're': '/primary-photo/media/rm(.*?)/tt',
'type': 'list'
},
'poster_ids': {
'page': 'posters',
're': '/unknown-thumbnail/media/rm(.*?)/tt',
'type': 'list'
},
'producers': {
'page': 'combined',
're': [
'Produced by</a>(.*?)</table>',
'<a href="/name/.*?/">(.*?)</a>'
],
'type': 'list'
},
'rating': {
'page': 'combined',
're': '<div class="starbar-meta">.*?<b>(.*?)/10</b>',
'type': 'float'
},
'release_date': {
'page': 'releaseinfo',
're': '<a href="/date/(\d{2})-(\d{2})/">.*?</a> <a href="/year/(\d{4})/">',
'type': 'date'
},
'title': {
'page': 'combined',
're': '<h1>(.*?) <span>',
'type': 'list'
},
'trivia': {
'page': 'trivia',
're': '<div class="sodatext">(.*?)<br>',
'type': 'list',
},
'votes': {
'page': 'combined',
're': '<a href="ratings" class="tn15more">(.*?) votes</a>',
'type': 'int'
},
'writers': {
'page': 'combined',
're': [
'Writing credits</a>(.*?)</table>',
'<a href="/name/.*?/">(.*?)</a>'
],
'type': 'list'
},
'year': {
'page': 'combined',
're': '<a href="/year/(\d{4})/">',
'type': 'int'
}
}
```

@ -0,0 +1,4 @@
## Multilingual Annotations
To mark out languages in annotations, you can use the html lang attribute while writing an annotation or select a language during annotation import.
The attribute can be added to any html element. If no element is used, wrap the annotation inside a span tag: `<span lang="en">...</span>`

6
MultipleAudioTracks.md Normal file

@ -0,0 +1,6 @@
## Multiple Audio Tracks
pan.do/ra supports items with multiple audio tracks. You can upload videos with multiple audio tracks, i.e. in mkv format. Another option is to upload each language as a new video and instead of parts, set the language attribute to each video (in the item media view).
Instead of iso 2 letter language codes you can also use an alternative track name. I.e. Director's Commentary.

10
Places.md Normal file

@ -0,0 +1,10 @@
* name: 'Camp Rooftop'
* aliases: ['Pirate Cinema Bombay']
* geoname: 'Camp Rooftop, Bandra, Bombay, Maharashtra, India'
* geoname_reverse: 'India, Maharashtra, Bombay, Bandra, Camp Rooftop'
* center_lat
* center_lng
* sw_lat
* sw_lng
* ne_lat
* ne_lng

129
QuerySyntax.md Normal file

@ -0,0 +1,129 @@
## Query Syntax
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
Simple query
```
query: {
conditions: [
{
key: "year",
value: [1970, 1980],
operator: "!-"
},
{
key: "country",
value: "f",
operator: "^"
}
],
operator: "&"
}
```
Complex query
```
query: {
conditions: [
{
conditions: [
{
key: "year",
value: 1960,
operator: "<"
},
{
key: "year",
value: 1960,
operator: ">"
},
{
key: "title",
value: "sex",
operator: ""
},
],
operator: "|"
},
{
key: "director",
value: "jean-luc godard",
operator: "="
}
],
operator: "&"
}
```
Objects
```
query: {conditions, operator}
conditions: [query|condition]
condition: {key, value, operator}
```
Operators
```
string
x: contains
!x: does not contain
^x: starts with
!^: does not start with
x$: ends with
!$: does not end with
^x$: is
!^x$: is not
number
x: is
!x: is not
<x: is less than
>x: is greater than or equal to
x-x: is between
!x-x: not between
conditions
a,b: a and b
a|b: a or b
```
Examples
```
foo
keyword:foo
year:1980,hello,country:usa
year:1980,hello,country:!usa
title:!^the
title:^the$
title:^100%24$
year:>1960,year:<1970
year:<1960|year:>1970|title:sex
profit:-1000000-1000000
profit:-1000000--500000
releasedate:1970-10-1970-12
releasedate:1970-1972-12-13
[year:<1960|year:>1970|title:sex],director:godard // group godard will be selected
[year:<1960|year:>1970|title:sex],[director:godard|director:scorsese] // groups godard and scorsese will be selected
director:godard,country:france,year:1967 // groups godard, france and 1967 will be selected
list:mylist,director:hitchcock
list:otheruser.publiclist,director:hitchcock
list:0xdb.timelines,director:hitchcock
```
Recursion
```
list:you.yourlist,list:!mylist (both dynamic)
... save as wishlist
... edit mylist to be wishlist
... now wishlist is: you.yourlist,!wishlist -> recursion
so if you change a dynamic list to contain a reference to itself,
you will get a recursion error.
which means that we'll need to add to the API a request like
function:norecursion,data:mydynamiclist
that returns a list of recursion-safe public dynamic lists
```
URLs
```
0xdb.org/#find=title:foo,director:!bar&sort=country,-year&view=icon,poster
0xdb.org/?find=title:foo,director:!bar&sort=country,-year&view=icon,poster // do we need this for search engines?
```

45
RenamingFiles.md Normal file

@ -0,0 +1,45 @@
## Semantic Meaning of Files
Each movie has a number of meta files, each of which has a number of file instances (paths in archives).
A meta file can have the following meaning:
- Movie File (avi/mkv/...)
- Movie File (avi/mkv/...), Part X
- Subtitle File (srt/sub/idx/rar)
- Subtitle File (srt/sub/idx/rar), Part X
- Other File (mp3/txt/...)
- Other File (mp3/txt/...), Part X
## Potential Errors and Warnings
Before files in an archive can be automatically renamed, we have to check for the following conditions:
Errors:
- "Concurrent Files" (multiple files with the same meaning and extension)
Warnings:
- "Multiple Files" (movie files with same meaning, but different extension)
- "Incorrect Subtitles" (there are subtitles, but not every movie file has subtitles, or not every subtitle file has a movie file)
- "Incomplete Subtitles" (idx without sub, or sub without idx)
- "Multiple Versions" (both non-part and part files)
- "Multiple Names" (different strings in Title.Version Name.Part X.ext)
- "Incorrect Parts" (parts are not 1, 2, 3 ... n)
## Renaming Files
Once the errors have been resolved, files can be renamed to:
L/Lastname, Firstname/The Title (Year)/The Title[.Version Name][.Part X].ext

60
UseCases.md Normal file

@ -0,0 +1,60 @@
## Use Cases
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
### Visitor
* search for a specific video
* browse videos
* embed clip on own page
* download full video
* download selected clip from video
### registered User
* add annotation
* manage videos in lists
* use browser extension to manage local videos
### Contributor(is this same as user?)
* create annotations before upload
* upload video and annotations
* add new annotations
* add geo data to location names
* manage videos in lists
* add keywords and categories intelligently (?)
* get some data about downloads, views of their video. (?)
### VIP
* see more info about videos
### Admin
* change data for users, videos, layers
* statistics
* remove video
* manipulate other information in terminal
* run scripts to update information on all videos
* mange featured lists
* manage subdomains
* change ownership for all layers of one video
* change ownership for all layers of one video belonging to user a to user b
### API/Bots/Embedding
* embed clips from videos on other pages
* embed maps with clips on other pages
* use api to build custom interfaces
* make sure POST requests are Cross-site scripting (XSS) save
* implement something like JSONP so that Api works when user can only use JS. (?)
* Allow user to select in-point, out-point and tracks to display, and generate an <embed> or <iframe> for user to embed.
* Have a javascript file user can include in their own page, something like jquery.padma.js, which then has hooks to some common configuration parameters.
#### For individual videos:
* Expose video metadata as JSON
* Expose layers metadata as JSON
* Allow to get layers for particular time-code
* Allow to get layers for particular time-code range
* Allow to get layers filtered by tracks
* Allow to get layers filtered by contributor
* ?? Allow to get layers filtered by contributor == original video contributor ??

20
config.md Normal file

@ -0,0 +1,20 @@
## Config
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
**Options**
use_imdb
* gets metadata from imdb (otherwise editable description etc.)
* uses imdb/0xdb ids (otherwise crockford base32)
* uses posters (otherwise icons only)
use_annotation
* users can add annotation (otherwise subtitles only)
use_???
* video can be larger than 90p
* full editor (otherwise just timeline and player)
* video can be downloaded

67
configuration.md Normal file

@ -0,0 +1,67 @@
# Pandora configuration
## settings_local.py
located at /srv/pandora/pandora/local_settings.py
* your database connection, i.e.:
```
DATABASES = {
'default': {
'NAME': 'pandora',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': '',
'PASSWORD': '',
}
}
```
* celery settings
```
BROKER_PORT = 5672
BROKER_USER = "pandora"
BROKER_PASSWORD = ""
BROKER_VHOST = "/pandora"
```
* location of site.jsonc
```
SITE_CONFIG = '/srv/pandora/pandora/SITENAME.jsonc'
```
* use an external data service, i.e.:
```
DATA_SERVICE = 'https://data.0xdb.org/api/'
```
* webserver integration:
* nginx:
```
XACCELREDIRECT = True
```
* apache:
```
XSENDFILE = True
```
* serve videos from other domain. to avoid some issues with browsers or for other reasons you might want to use another domain for your videos. several variables are expanded from the prefix: {uid}, {uid42}, {id}, {part}
```
VIDEO_PREFIX = "//video{uid}.pad.ma"
SESSION_COOKIE_DOMAIN = ".pad.ma"
```
* enable debug output in http responds, otherwise a traceback will be available in Debug->View Logs... for admins
```
DEBUG=False
```
## config.jsonc
look at config.0xdb.jsonc, config.pandora.jsonc and config.padma.jsonc to get an idea of available options for now.
## poster/icon scripts
if you customize your scripts, replace poster.py, item_icon.py or list_icon.py with your version.
## logo, icon
to customize your sites logo, icon replace static/png/logo.png or static/png/icon.png
## customize views
you can customize views or javascript files.
1.e. to customize the welcome screen, copy static/js/pandora/home.js to static/js/pandora/home.SITEID.js
(SITEID as defined in config.jsonc site.id) and change it. once you are done, run manage.py update_static

16
embed.md Normal file

@ -0,0 +1,16 @@
## Embedding Pan.do/ra on other Sites
To embed segments from a pan.do/ra site, select in/out in the editor view and select "Embed Section..." form the options menu to get the embed code.
### Blogs
#### Wordpress
if you host your own wordpress installation you can use the embed code, you might have to whitelist the pan.do/ra domain you want to embed. free wordpress.com blogs do not allow embedding of unknown domains. Write them and ask to whitelist your pan.do/ra domain.
#### tumblr
its possible to embed pan.do/ra videos in tumblr, click on the add video icon and paste pan.do/ra embed code.
#### Blogger
not tested
### CMS
#### Drupal
you can use the embed code in any drupal node if you allow iframes or raw html editing.

73
filenames.md Normal file

@ -0,0 +1,73 @@
## Filenames
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
This document describes a naming convention for archived movie files.
**Format**
```
character/director/title[/Extras|/Versions]/file
character: first character of director
director: "; ".join(sort_names) | "Unknown"
title: sort_title[ (YYYY)]
file: title[.SXXEYY][.episode_title][.version_name][.Part X[.part_title]][.track_name][.language].extension
```
**Examples**
```
"L/Last Names, First Names/film, Le (1999)/Le film.Part 1.Le debut.avi"
"B/Bar, Foo X.; Bar Jr., Foo X_/Film, A (2001)/A Film.Director's Cut.en.mkv"
"G/Group Name, The/Film, The (1970)/Extras/The Film.Restored Version.Part 1.Beginnings.Director's Commentary (French).mp3"
"C/Creator Last Name, Creator First Name/serie, La (2000)/La serie.S01E01.La première.European Version.Part 1.fr.srt"
```
**Character**
The aim is to have less than 1.000 entries per directory, so that file managers still perform. So we need a sub-directory, for which the upper case latinized (i.e. accent-less) first character of the director directory is used. We assume that only A-Z and 0-9 will occur.
If there were more than 1.000 directors with the same first letter, a two-character sub-directory could be better. Still, it's unlikely that this point will be reached. Some numbers from 0xdb, as of December 2009: ca. 8.000 Movies, 2.541 directors, 26 sub-directories (A-Z), most items in S (243), B (226) and M (205), there would be 238 two-letter sub-directories, most items in Ma (77), De (57) and Ca (56). If the apostrophe in L'... and O'... was removed, there would still be B_ (B., Beth) and O_ (O., Dore) as special cases.
**Director**
This is the sort name of the director (or, for series, the creator), which is usually "Last Names, First Names", but "Last Names First Names" (without the comma) for some asian names. "Le", "de", "von", "van der" etc. are considered to be part of the last name. For groups, their sort name is used as well, which is "Group Name", or "Group Name, The". If the last letter of the director string is a dot, it is replaced by an underscore, since some file systems may not like trailing dots.
Multiple directors are separated with a semicolon and a space, their names appear in the order they are credited on IMDb, which is not necessarily the alphabetical order. There may be films with a large number of directors, but this seems to be so rare that it doesn't justify a special case, like "V/Various Directors". [if we have a 255 char limit]check In case there is more than one director with the same name, the director name should be post-fixed with "(Year of Birth)" or ("Year of Birth-Year of Death"). Finally, movies without known director, or series without known creator, go into "U/Unknown".
Examples: "Godard, Jean-Luc", "Fassbinder, Rainer Werner", "van Gogh, Theo", "De Palma, Brian", "Suzuki, Norifumi", "Wong Kar Wai", "Bernadette Corporation", "KLF, The", "Smith, Jack (1932-1989)"
**Title**
The title sub-directory makes it easier to share single movies as a single torrent, and helps to avoid clutter for directors with a large number of movies, or movies with a large number of files. The sort title is used, which is "Title, The", or "film, Le" (the first letter is not changed to upper case). Additionally, if the year is known, it is appended in brackets, to avoid ambiguities (see examples). In the rare case that this is still ambiguous, a roman numeral is appended, as on IMDb.
NOTE: In practice, this turns out to look stupid, especially non-capitalized titles like "enface, L' (1993)". While for directors, "Lastname, Firstname" makes sense, there is not much value in sorting movies by title. It would be much more meaningful to sort them by year (to be able to see early/late films, or select the previous/next film). So format should rather be "(YYYY) Le film".
NOTE: settling for "Le film (YYYY)"...
The title should be the original language title if it is English, French, German, Italian, Spanish, Portuguese (or any other language the archivists are able to read and verify), otherwise, the international U.S. or English title, if any, should be used. While special characters and punctuation should be preserved, colons, slashes, asterisks and leading or (for movies without year) trailing dots need to be replaced by underscores. A parser should (at least) assume that "x_ " is "x: ", "x_x" is "x/x", "x _ x" is "x / x", a single underscore at the beginning or end of the string is a dot, and multiple consecutive underscores are consecutive asterisks.
Examples: "Man Who Knew Too Much, The (1934)", "Man Who Knew Too Much, The (1956)", "Film with Unknown Year", "Film with Unknown Year and Trailing Dots.._", "The Simpsons_ The Movie", "Untitled (2000 I)", "Untitled (I)", "Film We Didn't Manage to Split, A (1999) + From Another Film, Even Though We Tried Hard (2001)", "(A Film with a Title That Begins with) A Bracket"*
* this may not preserve the sort order, but "Film with a Title That Begins with) Bracket, (" (or 'Foo" Bar, "') looks wrong
**File**
Director and year are not repeated in the file name, so that it doesn't grow too long. The parts of the file name are separated by dots, since this is already the convention for language and extension, and in order to avoid consecutive hyphens or brackets ("Title - With a Hyphen - Part 1.avi", "Title (With Brackets) (Part 1).avi"), or nested brackets ("Title (Part 1 Part Title (With Brackets)).avi"). With dots, there are fewer ambiguous cases ("Web 2.0.avi", "Dot.com.avi", "If....avi").
The file name begins with the title (not sort title), and is followed by: episode ("SxxEyy", for series that have multiple numbered seasons and episodes ... note that yy can be 00), episode title (for episodes that have a title), version name ("Director's Cut", "Long Version", "Excerpt", etc.), part ("Part x", for movies split into multiple files), part title (for movies with parts that have titles), track name (mandatory for audio or subtitle commentary files), language (for hard-coded subs and srt files, can be omitted if there is only one English srt file) and extension ("avi", "mpg" etc. for movie files, "srt", "sub", "idx" for subtitle files - "rar" should be unpacked - and "mp3", "aac" etc for audio commentary files).
A parser should not assume that, in "Part x", x is a number (special part strings: "Six fois deux.Part 4B.Nanas.avi"), or that for one movie, x begins at 0 or is consecutive (segment films: "Paris vu par....Part 3.Montparnasse-Levallois.avi"), but only concatenate parts in sort order. Further, it should be ok, for the sake of simplicity, to denote languages using ISO 3166 for countries, instead of the correct ISO 639 for languages, and to use "cc" and "en" to distinguish English closed captioning subtitles from normal English subtitles, in case both are present.
Examples: "Apocalypse Now.Director's Cut.Part 1.avi", "Apocalypse Now.Director's Cut.Part 1.fr.srt", "Ché Part 1.Part 1.avi", "Der Himmel über Berlin.Part 1.en.avi", "Inland Empire.Director's Commentary.srt", "The Wire.S01E01.The Target.avi", "Generation Kill.E01.Get Some.avi", "Cinema, de notre temps.David Lynch_ Don't Look at Me.avi", "Historie(s) de cinéma.Part 1a.Toutes les histories.avi"*
* in this case, a parser follwing IMDb would move "Historie(s) de cinéma/Historie(s) de cinéma.Part 1a.Toutes les histories.avi" to "Histoire(s) du cinéma_ Toutes les histoires (1988)/Histoire(s) du cinéma_ Toutes les histoires.avi", which is unfortunate ... but, in order to preserve the part information, a workaround could be to name the file "Histoire(s) du cinéma_ Toutes les histoires (1988)/Histoire(s) du cinéma_ Toutes les histoires.Part 1a.avi"
**Extras and Versions**
Extras go into an "Extras" sub-directory within the movie directory. The file names begin with the movie title, followed by the title of the extra, or "Extras" if none, plus eventual additional parts.
Examples: "Extras/The Film.Extras.avi", "Extras/The Film.Interview.avi", "Extras/The Film.Behind the Scenes.Part 1.Getting Behind the Scenes.de.srt"
Additional versions go into a "Versions" sub-directory within the movie directory. They may be ignored (as extras are), or parsed (in a system that needs multi-version views). The version in the movie directory is considered to be the main version. Versions do not have additional "Extras" sub-directories.
Examples: "Versions/The Film.Short Version.avi", "Versions/The Film.Original Version.Part 1.es.srt"

14
groups.md Normal file

@ -0,0 +1,14 @@
## Groups
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
A user can define groups, and add other users to them.
The owner of an item can assign, as part of the per-item metadata, one or more groups per item.
(Alternatively, groups could be implemented as special lists, but that seems like too much overloading of API and UI)
Everyone in a group has the same rights as the user that created it, with regards to
* finding the items (when hidden)
* editing the items' metadata
* editing, within the group's items, each other's annotations
* deleting the items
* managing the group

39
ids.md Normal file

@ -0,0 +1,39 @@
## ID Scheme
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
```
IMDb Id
0060304
0xDB Id
Movies
'0x' + d[0] + t[0] + d[1] + t[1] + ... d[7] + t[7]
// where d is sha1("director"), t is sha1("title\nyear") and sha1 is hashlib.sha1(str).hexdigest().upper()
// this makes 0xdb posters for the same director have similar colors
Episodes
'0x' + d[0] + t[0] + d[1] + t[1] + d[2] + t[2] + d[3] + t[3]
+ d_[0] + t_[0] + d_[1] + t_[1] + d_[2] + t_[2] + d_[3] + t_[3]
// where d is sha1("creator"), t is sha1("series_title\nseries_year\nseason)"),
// d_ is sha1("director") and t_ is sha1("episode\nepisode_title\nyear)")
// this makes 0xdb posters for the same season have the same color
Pandora Id
Crockford Base 32 Encoding (0-9 A-Z w/o ILOU, see http://www.crockford.com/wrmg/base32.html)
// used for video and layer ids
```
## Mapping Ids
```
oxdb_id <- get_oxdb_id(director, title, year, ...)
imdb_id <- imdb.get_id(director, title, year, ...)
allmovie_id <- imdb.get_data(imdb_id) | wikipedia.get_data(wikipedia_id)
criterion_id <- criterion.get_id(imdb_id) // data service
impawards_id <- impawards.get_id(imdb_id) // data service
karagarga_ids <- karagarga.get_ids(imdb_id) // data service
metacritic_id <- imdb.get_data(imdb_id) | wikipedia.get_data(wikipedia_id)
rottentomatoes_id <- imdb.get_data(imdb_id) | wikipedia.get_data(wikipedia_id)
wikipedia_id <- wikipedia.get_id(imdb_id)
```

8
install.md Normal file

@ -0,0 +1,8 @@
## Install Pan.do/ra
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
check the the code
> git clone !<https://git.0x2620.org/pandora.git>
and follow instructions in [README](https://wiki.0x2620.org/browser/pandora/README)

46
ldap.md Normal file

@ -0,0 +1,46 @@
Using django-auth-ldap:
```
sudo apt-get install python-ldap
```
with pandora in /srv/pandora:
```
cd /srv/pandora
./bin/pip install django-auth-ldap
```
add to /srv/pandora/pandora/local_settings.py: (based on <http://pythonhosted.org/django-auth-ldap/example.html)>
```
import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"
AUTH_LDAP_BIND_DN = "cn=django-agent,dc=example,dc=com"
AUTH_LDAP_BIND_PASSWORD = "phlebotinum"
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
AUTH_LDAP_USER_ATTR_MAP = {
"email": "mail"
}
AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=django,ou=groups,dc=example,dc=com",
ldap.SCOPE_SUBTREE, "(objectClass=groupOfNames)"
)
AUTH_LDAP_GROUP_TYPE = GroupOfNamesType(name_attr="cn")
AUTH_LDAP_USER_FLAGS_BY_GROUP = {
"is_active": "cn=active,ou=django,ou=groups,dc=example,dc=com",
"is_staff": "cn=staff,ou=django,ou=groups,dc=example,dc=com",
"is_superuser": "cn=superuser,ou=django,ou=groups,dc=example,dc=com"
}
AUTH_LDAP_ALWAYS_UPDATE_USER = True
AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
)
```

26
media.md Normal file

@ -0,0 +1,26 @@
## Media Formats
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
* From Client/Backend
**Video**
96p (resized to 128 wide), 360p, 480p, 720p
**Timeline**
16p, 64p
**Stills**
5 stills for each file
* On Server
**Poster**
16px (History), 64px (Browser), 128px (List), 256px (Info), original
**Icon**
16px (History), 64px (Browser), 128px (List), 256px (Info)

270
metadata.md Normal file

@ -0,0 +1,270 @@
## Metadata
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
### IMDb Metadata
```
title "" title combined
season 0 combined
episode 0 combined
series_title "" combined
episode_title "" combined
creators [""] maindetails of series page, used to determine canonical file name
series_year 0 maindetails of series page, used to determine canonical file name
directors [""] director fullcredits
countries [""] country combined
year 0 year combined
runtime 0 (sec) runtime combined
languages [""] language combined
alternative_titles [""] releaseinfo (whitelist)
writers [""] writer fullcredits
producers [""] producer fullcredits
cinematographers [""] cinematographer fullcredits
editors [""] editor fullcredits
cast [C] fullcredits
genres [""] genre combined
keywords [""] keyword keywords
summary "" plotsummary
synopsis "" synopsis
trivia [""] trivia
companies [""] company combined
release_date D releasedate releaseinfo
budget 0 budget business
gross 0 gross business
profit 0 profit (gross-budget)
rating 0.0 rating combined
votes 0 votes combined
edited_from [M] movieconnections
edited_into [M] movieconnections
follows [M] movieconnections
followed_by [M] movieconnections
remake_of [M] movieconnections
remade_as [M] movieconnections
spin_off_from [M] movieconnections
spin_off [M] movieconnections
features [M] movieconnections
featured_in [M] movieconnections
references [M] movieconnections
referenced_in [M] movieconnections
spoofs [M] movieconnections
spoofed_in [M] movieconnections
recommendations [M] recommendations
reviews [L] externalreviews (whitelist)
links [L] miscsites (whitelist)
filming_locations [""] filminglocation locations
id "" id
IMDb Sort
number_of_directors directors x directors
number_of_countries countries x countries
number_of_writers writers x writers
number_of_producers producers x producers
number_of_cinematographers cinematographers x cinematographers
number_of_editors editors x editors
entries_in_cast cast x entries
number_of_genres genres x genres
number_of_keywords keywords x keywords
words_in_summary summary x words
words_in_synopsis synopsis x words
entries_in_trivia trivia x entries
number_of_companies companies x companies
number_of_connections connections x connections
number_of_reviews reviews x reviews
number_of_links links x links
number_of_filming_locations filminglocations x locations
Other Metadata
allmovie_id ""
criterion_id ""
karagarga_ids [""]
metacritic_id ""
posters [{"": [""]}]
rottentomatoes_id ""
score 0.0 (allmovie*20+imdb*10+metacritic+rottentomatoes)/4
torrents [L]
wikipedia_id ""
// Links: AllMovie, Amazon, Criterion, Google, Metacritic, Rotten Tomatoes, Wikipedia
// Karagarga: [Title, [Subtitles]]
// OpenSubtitles: [Subtitles]
0xDB Metadata
locations [""] location
events [""] event
number_of_locations 0 locations
number_of_events 0 events
resolution 0 (w*h) resolution w x h admin
aspect_ratio 0.0 (:1) aspectratio x.xx:1
duration 0.0 (sec) duration xx:xx:xx
pixels 0 pixels x.xx Gpx admin
size 0 size x.xx GB admin
bitrate 0.0 (kbps) bitrate x.xx kbit/sec admin
bits_per_pixel 0.0 (bppx) bitsperpixel x.xx bit/px admin
color 0.0 (0-360) color x.x []
saturation 0.0 (0-1) saturation x.xxx
brightness 0.0 (0-1) brightness x.xxx
volume ? volume ?
shots 0 shots x shots
shots_per_minute 0.0 shotsperminute x.xx shots/min
words 0 words x words
words_per_minute 0.0 wordsperminute x.xx words/min
clips 0 clips x
date_created D datecreated YYYY-MM-DD HH:MM:SS admin
date_published D datepublished YYYY-MM-DD HH:MM:SS
date_modified D datemodified YYYY-MM-DD HH:MM:SS
date_accessed D dateaccessed YYYY-MM-DD HH:MM:SS
times_accessed 0 popularity x.x% (#/max*100)
files 0 files x files admin
filenames [""] filename abc...xyz admin
Objects
C cast ["actor", "character"]
D date timestamp
L link ["site", "url"]
M movie ["title", "id"]
Whitelists
Alternative Titles
International
UK
USA
(undefined)
Links
All Movie Guide -> allmovie_id
BFI
Reviews
All Movie Guide -> allmovie_id
BBCi
Chicago Sun-Times
Filmcritic
Guardian
Los Angeles Times
Metacritic
New York Times
Rolling Stone
Rotten Tomatoes -> rottentomatoes_id
Salon
San Francisco Chronicle
Senses of Cinema
Variety
Village Voice
Find Menu
[all]
title
director
country
year
language
writer
producer
cinematographer
editor
actor
character
person (director, writer, producer, cinematographer, editor, actor, character)
genre
keyword
summary
synopsis
trivia
text (genre, keyword, summary, synopsis, trivia)
company
connection
location
dialog
filename (admin)
Advanced Find Dialog
title string
director string
country string
year number (year)
runtime number (time)
writer string
producer string
cinematographer string
editor string
actor string
character string
person string
genre string
keyword string
summary text
synopsis text
trivia text
text text
company string
releasedate number (date)
budget number (currency)
gross number (currency)
profit number (currency)
rating number (integer 0-100) // imdb_rating*10
votes number (integer 0-100) // #/max*100
connection string
review string
link string
location string
resolution number (resolution)
aspectratio number (ratio)
duration number (time)
pixels number (K/M/G px)
color color [bw, red, orange, yellow, lime, green, turquoise, cyan, aqua, blue, violet, magenta, purple]
saturation number (float 0-1)
brightness number (float 0-1)
shots number (integer)
shotsperminute number (float)
words number (integer)
wordsperminute number (float)
clips number (integer)
dialog text
date_created number (date)
date_published number (date)
date_modified number (date)
date_accessed number (date)
popularity number (float 0-100)
size number (K/M/G B)
bitrate number (bitrate)
bitsperpixel number (bitrate)
files number (integer)
filename string
list list
Operators
color
is x
is not !x
is between x-x
is not between !x-x
list
is x
is not !x
number
is x
is not !x
is less than <x
is greater than or equal to >x
is between x-x
is not between !x-x
string
is ^x$ any is
is not !^x$ all are not
contains x any contains
does not contain !x all do not contain
starts with ^x any starts with
does not start with !^x all do not start with
ends with x$ any ends with
does not end with !x$ all do not end with
text
contains x
does not contain !x
```
see [0xdb2QuerySyntax]wiki:pandora/QuerySyntax

75
objects.md Normal file

@ -0,0 +1,75 @@
## Database Objects
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
### Clip Object
```
{
brightness: 0.0,
clip_id: "",
color: 0.0,
duration: 0.0,
id: "", // "item_id/clip_id"
in: 0,
item_id: "",
out: 0,
saturation: 0.0,
text: "", // annotation
type: "", // description|event|keyword|location|note|reference|subtitle|transcript
user: "", // creator
volume: ?
}
```
### File Object
```
{
channels: 0, // only if is_video
instances: [{
path,
user,
accessed: 0, // filesystem
created: 0, // filesystem
modified: 0, // filesystem
}]
published: 0,
duration: 0.0, // seconds
episode: 0, // -1 for none
hash: "", // 0xHash
height: 0, // only if is_video
is_audio: false,
is_extra: false, // is in Extras subfolder
is_main: false, // is not in subfolder
is_subtitle: false,
is_version: false, // is in Versions subfolder
is_video: false,
language: "", // "en", "fr", etc., only if is_subtitle
movie_id: "",
name: "", // canonical path/file
part: "", // "" for none
season: 0, // -1 for none
sort_name: // sort path/file name
size: 0,
version: "", // has a version string,
width: 0 // only if is_video
}
```
### User Object
```
{
created: 0,
modified: 0,
history: [{
id: "", // if type==item
query: "", // if type==list
time: 0,
type: item|list
}],
name: "",
group: user|staff|admin,
preferences: {}
}
```

14
objects/Item.md Normal file

@ -0,0 +1,14 @@
### Item
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
[current database implementation](https://wiki.0x2620.org/browser/pandora/pandora/item/models.py#L93)
data depends on metadata fields defined in config.
```
{
title: "",
director: [],
user: ""
...
}
```

21
objects/Place.md Normal file

@ -0,0 +1,21 @@
### Place
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
[current database implementation](https://wiki.0x2620.org/browser/pandora/pandora/place/models.py#L13)
```
{
name: [],
geoname: "",
south: float,
west: float,
north: float,
east: float,
lat: float,
lng: float,
size: float,
user: "",
created:
modified:
}
```

21
permissions.md Normal file

@ -0,0 +1,21 @@
## Permissions
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
* Item
* play
* edit
* delete
* Annotation
* add
* edit
* Group
* edit
## User Levels
* Anonymous
* Registered User
* Staff
* Admin

11
posterservice.md Normal file

@ -0,0 +1,11 @@
## Posterservice API
```
url?id=
{
site: [
{url: absolute_url to poster, width: int, height: int},
]
}
```

34
services.md Normal file

@ -0,0 +1,34 @@
## Services
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
### Calendar Service
instance:name to start,end
### Data Service
structured cache of third-party sites (criterion, kg, ...)
### Id Service
hash to 0xdb_id
filename to {director, title, year, creator, series_title, series_year, season, episode, episode_title, part, version, 0xdb_filename}
{director, title, year, creator, series_title, series_year, season, episode, episode_title} to {0xdb_id, imdb_id}
imdb_id to {allmovie_id, criterion_id, impawards_id, karagarga_id, wikipedia_id}
### Map Service
instance:name to lat,lng
### Metadata Service
imdb_id to metadata
### Poster Service
imdb_id to {0xdb, allmovie, criterion, imdb, impawards, karagarga, movieposterdb, wikipedia}
precedence: []piratecinema, criterion, wikipedia, impawards, movieposterdb, imdb, allmovie, karagarga, 0xdb

37
shell.md Normal file

@ -0,0 +1,37 @@
## collection of ./manage.py shell scripts
get item
```
import item.models
i = item.models.Item.objects.get(itemId='ABC')
```
get user
```
import user.models
u = user.models.User.objects.get(username='j')
```
find broken or aborted derivatives and encode again
```
import archive.models
import ox
for s in archive.models.Stream.objects.exclude(source=None):
if s.info.get('duration', -1) < 0:
print s
s.encode()
s.info = ox.avinfo(s.video.path)
s.save()
print s.info.get('duration')
```
extract timelines again
```
import item.models
i = item.models.Item.objects.get(itemId='ABC')
for s in i.streams(): s.make_timeline()
i.update_timeline()
```

64
ssl.md Normal file

@ -0,0 +1,64 @@
### Using Let's encrypt to add ssl
1. install simp_le in /opt/simp_le
```
cd /opt
git clone https://github.com/kuba/simp_le
cd simp_le
./venv.sh
```
2. prepare nginx
add/edit vhost
```
server {
listen 80;
listen [::]:80;
server_name ${domain} ~^video\d+\.${domain} media.${domain} www.${domain};
location /.well-known/acme-challenge/ {
root /srv/letsencrypt/;
autoindex off;
}
if ($request_uri !~ "^/.well-known/acme-challenge/") {
return 301 https://$host$request_uri;
}
access_log /var/log/nginx/${domain}.access.log;
error_log /var/log/nginx/${domain}.error.log;
}
```
3. generate/update script
update.sh:
```
#!/bin/bash
cd $(dirname $0)
function update {
chown root.ssl-cert key.pem
chmod 640 key.pem
service nginx reload
}
domain=$(basename $(pwd))
root=/srv/letsencrypt
subdomains="-d www.${domain} -d media.${domain}"
for i in `seq 0 41`; do
subdomains="${subdomains} -d video${i}.${domain}"
done
/opt/simp_le/venv/bin/simp_le \
-f account_key.json -f chain.pem -f cert.pem -f fullchain.pem -f key.pem \
--email hostmaster@${domain} \
-d ${domain} $subdomains --default_root $root && update
```
4. update nginx
tbd
5. add cronjob
tbd

157
text.md Normal file

@ -0,0 +1,157 @@
## Text
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
**Html tags / formatting tags that can be used in texts or annotations:**
* See sample text on pad.ma - <https://pad.ma/texts/zi:dummy_example>
** Annotations / Summaries / Texts:
* Italics:
```
<i>...</i>
```
* Bold:
```
<b>...</b>
```
* Line break:
```
<br>
```
* Para / double linebreak:
```
<br><br>
```
* Paragraph:
```
<p>...</p>
```
* Underline:
```
<u>...</u>
```
* Link:
```
<a href="URL">...</a>
```
* Image:
```
<img src="URL">
```
** Stuff used mostly in Texts:
* Heading:
```
<h2>...</h2>
```
* Centre something:
```
<figure>...</figure>
```
* Embed url:
```
<a href="url to embed">hyperlinked text</a>
```
* Embed clip from site, for example:
```
<a href="/ID/player/00:08:11.475,00:10:25.750#embed?showAnnotations=true&paused=false">display this instead of url</a>
```
```
<a href="/<pad.ma ID>/player/<TC in>,<TC out>#embed?showAnnotations=true&paused=false">hyperlinked text</a>
```
- Simple embed, no text is hyperlinked, display url (pad.ma clip url with in-point and out-point marked):
* without annotations displayed:
```
https://pad.ma/{pad.ma ID}/player/{TC in},{TC out}#embed
```
* url, embed code for all annotation layers displayed:
```
<a href="/{pad.ma ID}/player/{TC in},{TC out}#embed?showAnnotations=true&paused=false">pad.ma/{pad.ma ID}/player/{TC in},{TC out}</a>
```
* embed code to display only transcripts and description layers:
```
#embed?showAnnotations=true&showLayers=[&quot;descriptions&quot;,&quot;transcripts&quot;&paused=false
```
!!! * Note: In a text, replace "&paused=false" with "&paused=true" for the first in-site (pad.ma/indiancine.ma) embedded url.
This ensures the first embed link does not autoplay, unless played from video controls.
* Remove current position from the url (ie the first of the 3 timecodes after marking in and out positions in the video).
* Superscript: <sup>...</sup>
* <blockquote>...</blockquote>
* Unordered / Bulleted List:
```
<ul><li>item 1</li>
<li>item 2</li>
... </ul>
```
* Ordered List:
```
<ol><li>item 1</li>
<li>item 2</li>
...</ol>
```
* Anchor / Link within current page:
To create an anchor within the text whose url is !<https://pad.ma/texts/zi:dummy_example>
Element to be linked / anchored:
```
<{element} data-name="{some marker}">...</{element}>
```
Link to above element somewhere in the body of the text:
```
<a href="/texts/zi:dummy_example/{some marker}">{hyperlinked text}</a>
```
Note: '{element} can be p / blockquote / etc

74
todo.md Normal file

@ -0,0 +1,74 @@
## todo
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
* Annotations
* view annotations in timeline view
* add/edit/remove annotations
* layer types: place, event, text, select string from list, string with autocomplete
* manage layers(?)
* Find
* filter by annotations, i.e. fold all temporal keywords or places of one item as item properties
* !Files/Admin
* view files used for items
* move files to other/new item
* Poster management
* set poster frame
* select poster from available posters
* User settings
* switch between poster and icon view
* enable TV(still needed or can be done with lists?)
* Map
* manage places
* link annotation location layer to map
* view item on map
* view results on map
* more item views
* info
* files
* clips
* statistics
* map
* calendar
* more result views
* info
* clips
* map
* timeline
* as clips
* on map
* Edits
* combined clips in one timeline
* editing edits, viewing edits,...
* Homepage
* featured items
* featured clips/annotations
* featured lists
* featured texts
* news
* News
* add/edit news
* newsletter integration, send to all subscribed members, what about mails not subscribed?
* Texts
* add/edit/feature texts
* find texts
* Embedding
* iframe embed for items (info,timeline,map), clips(with annotations)
* Integration
* search engine integration: sitemap/meta tags/robots
* rss/atom feed of recent videos, lists, custom queries, news
* OxFF support
* integrate OxFF and/or Firefogg to allow uploading/syncing of archives/new videos

296
urls.md Normal file

@ -0,0 +1,296 @@
## URL Scheme
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
```
Is there any reason why we're using url search syntax like ?find=...&sort=... ?
Why not 0xdb.org/ID/view/sort/find ?
And for most users, dropping the regexp special chars would be a good thing
k=v k!=v k==v k!==v (contains, does not contain, is, is not)
k=v* k!=v* k=*v k!=*v (starts with, ends with, does not start with, does not end with)
k<v k>v k<=v k>=v (less, greater, less or equal, greater or equal)
k=a:b k!=a:b (is between, is not between)
the corresponding operators would change only slightly
= != == !==
^ !^ $ !$
< > <= >=
: !:
fewer characters would have to be escaped in string values:
/ & | ( ) = *
and : in list names
# should work unescaped
before: 0xdb.org/grid/?find=list:rlx/foo%3Abar,[director:^JLG$|director:^FFC$]&sort=-votes
after: 0xdb.org/grid/-votes/list=rlx:foo%3Abar&(director==JLG|director==FFC)
... looks nicer
before: ???
after: 0xdb.org/0060304/clips/clip:saturation/subtitles=hello
before: ???
after: 0xdb.org/0060304/timeline/01:00:00/subtitles=hello
before: ???
after: 0xdb.org/0060304/map/barcelona/subtitles=hello
```
```
0xdb.org/page
0xdb.org/(part/)(view/)(?find=)(&sort=)
0xdb.org/(part/)(item/)(view/)(time/)(?find=)(&sort=)
page: special page
about, contact, faq, help, home, news, preferences,
signin, signout, signup, software, tour, tos
/ is /home on page load, and /items otherwise
part: part of the site
items [movies/videos/...], edits, texts
items can be omitted
item: item id
0123456 (imdb), 0x0123456789ABCDEF (0xdb), ABC (base 26)
always begins with 0-9A-Z
view: list or item view
list: list, icons, info, clips, timelines, maps, calendars, clip, map, calendar, json
item: info, statistics, clips, video, timeline, files, json
list views share their namespace with page and part
time: position and selection in video or timeline view
time can be position, selection, position,selection or selection,position
position can be 01:02:03 or 0.5: or 1000
selection can be 01:00-02:00 or 01:00- or -02:00 or - or ABC or subtitles:1
annotation IDs have to be base 26
find: query
see query syntax
can be present in all list and clip views
(will filter in clips view, highlight in timeline view, etc.)
sort: sort
key or +key or -key or +keyA,-keyB
in list clip view, this can be duration,clip:duration or clip:saturation,brightness
NOTE: if there is an applicable query (foo, or layer:foo),
list clip view and item clips view will always filter clips accordingly.
There is no list clip view for "all clips of movies with clips that match foo".
When loading 0xdb.org/foo, if foo is not a page, part, item or view,
check if foo is an exact item title, otherwise treat foo as a query string.
```
```
QUERY STRING
?find=conditions[&sort=sort]
conditions
single: condition
multiple (a and b): condition+condition
multiple (a or b or c): condition|condition|condition
multiple (a and (b or c) and d): condition+(condition|condition)+condition
condition
[key:]value
key
any item key, or list, or some special stuff (canplayvideo etc)
value
encode(value) ... we have to escape:
? & = # [url special chars]
: + | ( ) [query special chars]
! ^ $ < > [operator special chars]
/ [in list names, see below]
NOTE:
list:username/listname is ambiguous (one may create a list "foo/bar", where "foo" is an existing user)
unless we make it list:username/foo%2Fbar (i.e. encode slashes in list names)
encodeURI() does not encode:
0-9A-Za-z - _ . ! ~ * ' ( ) ; , / ? : @ & = + $ #
encodeURIComponent() does not encode
0-9A-Za-z - _ . ! ~ * ' ( )
```
```
VALID NAMES
username
0-9 A-Z a-z SPACE . - '
at least one char, case-insensitive
non-alphanumeric chars must follow and be followed by an alphanumeric char,
except ".", which must follow a letter and be followed by space or end of string
The idea is that anyone who can spell their name in ASCII
can use their name (George W. O'Donald-Douglas),
and it's not totally easy to impersonate someone (admin vs. admîn vs. admiN)
listname
could be 0-9 A-Z a-z SPACE . , : ; ! ? ' " ( ) [ ] { } + - * / & | = < > ` ~ @ # $ % ^ _ \
(all printable ASCII characters)
but why not anything unicode, at least one char?
```
```
0xdb.org/ find with welcome screen
0xdb.org/0060304 item with imdb id
0xdb.org/0060304/23 item with subtitle #23
0xdb.org/0060304/01:23:45 item with subtitle near 01:23:45
0xdb.org/0x0123456789ABCDEF item with oxdb id
0xdb.org/ABC item with pandora id (0-9|A-Z)
0xdb.org/ABC/01:23:45 item with position
0xdb.org/ABC/12:34-56:00 item with selection
0xdb.org/ABC/DEF item with layer
0xdb.org/ABC/calendar item in calender view
0xdb.org/ABC/clips item in clips view
0xdb.org/ABC/editor item in editor view (padma)
0xdb.org/ABC/files item in files view (staff/admin)
0xdb.org/ABC/info item in info view
0xdb.org/ABC/map item in maps view
0xdb.org/ABC/posters item in posters view (admin)
0xdb.org/ABC/statistics item in statistics view
0xdb.org/ABC/timeline item in timeline view (0xdb)
0xdb.org/(0-9|A-Z) item not found
0xdb.org/edit new timeline
0xdb.org/edit=name existing timeline
0xdb.org/edit=user.name public timeline
0xdb.org/find find without welcome screen
0xdb.org/find=value find all
0xdb.org/find=key:value
0xdb.org/find=key:!value
0xdb.org/find=key:^value
0xdb.org/find=key:!^value
0xdb.org/find=key:value$
0xdb.org/find=key:!value$
0xdb.org/find=key:^value$
0xdb.org/find=key:!^value$
0xdb.org/find=key:>value
0xdb.org/find=key:!>value
0xdb.org/find=key:<value
0xdb.org/find=key:!<value
0xdb.org/find=key:value-value
0xdb.org/find=key:!value-value
0xdb.org/find=key:value,key:value
0xdb.org/find=key:value|key:value
0xdb.org/find=value&sort=key
0xdb.org/find=value&view=view
0xdb.org/find=k:v&sort=k&view=view
0xdb.org/(a-z) alias for find=(a-z) (for any non-reserved word)
0xdb.org/(a-z),(a-z) alias for find=(a-z),(a-z) (for any non-reserved word)
0xdb.org/key:value alias for find=key:value
0xdb.org/key:value,value alias for find=key:value,key:value
0xdb.org/(k:v,k:v)|(k:v,k:v) alias for find=(k:v,k:v)|(k:v,k:v)
0xdb.org/list:name alias for find=list:name
0xdb.org/list:0xdb.name alias for find=list:0xdb.name
0xdb.org/list:user.name alias for find=list:user.name
0xdb.org/list:user.name,user.name alias for find=list:user.name,list:user.name
0xdb.org/sort=key,-key
0xdb.org/view=view
0xdb.org/calendar alias for view=calendar
0xdb.org/calendars alias for view=calendars
0xdb.org/clips alias for view=clip (results with clips)
0xdb.org/flow alias for view=flow (coverflow meets snowstack)
0xdb.org/icon alias for view=icon
0xdb.org/icon/poster alias for view=icon/poster
0xdb.org/icon/still alias for view=icon/still
0xdb.org/icon/timeline alias for view=icon/timeline
0xdb.org/list alias for view=list
0xdb.org/map alias for view=map
0xdb.org/maps alias for view=maps
0xdb.org/mix alias for view=mix (results as clips)
0xdb.org/timeline alias for view=timeline (result as timeline)
0xdb.org/timelines alias for view=timelines
0xdb.org/about last page with dialog
0xdb.org/contact last page with dialog
0xdb.org/faq last page with dialog
0xdb.org/help last page with dialog
0xdb.org/login last page with dialog
0xdb.org/logout last page with dialog
0xdb.org/news last page with dialog
0xdb.org/preferences last page with dialog
0xdb.org/register last page with dialog
0xdb.org/reset last page with dialog
0xdb.org/tos last page with dialog
0xdb.org/tour last page with dialog
0xdb.org/admin
views
list (classic): calendars, clips, flow, icon, json, list, maps, timelines
list (special): calendar, map, mix, timeline
item (view): calendar, clips, files, info, json, map, posters, statistics, video
item (edit): calendar/edit|events, info/edit|metadata, map/edit|locations, video/edit|editor
keys
accessed
aspectratio
bitrate
bitsperpixel
brightness
budget
cast
cinematographer
cinematographers
clips
color
companies
company
connections
countries
country
created
director
directors
duration
editor
editors
event
events
filename
files
filminglocation
filminglocations
genre
genres
gross
id
keyword
keywords
language
links
location
locations
modified
pixels
popularity
producer
producers
profit
published
rating
releasedate
resolution
reviews
runtime
saturation
score
shots
shotsperminute
size
summary
synopsis
title
trivia
volume
votes
words
wordsperminute
writer
writers
year
```
see [0xdb2Metadata]wiki:pandora/metadata

25
video.md Normal file

@ -0,0 +1,25 @@
## Video Playback
[Documents, pandora*, 0xdb2*)]TOC(heading=Design
### WebM
#### Support in toolchain
* oxframe supports extracting frames from WebM files
* WebM support in Firefogg (needs more testing and options)
* oxtimeline should be able to extract timeline from WebM files (needs testing)
* client side seeking seams to be good enough(except for safari) ([test here](http://firefogg.org/j/webm/448.html))
#### Issues
* Perian trunk supports WebM files, Quicktime7 does not allow plugins to seek in http resources outside of the already downloaded area.
in addition to this Apple shows no interest to support WebM themselfs. this means, WebM support in Safari will not happen.
* oggz-chop replacement to allow downloading of segments (this needs a new tool, using ffmpeg might be an option)
#### TODO
* migration plan for 0xdb and pad.ma content
* good encoding settings for required bandwidth and resolutions
### Ogg Theora
#### Issues
* oggz-chop does not work in Chrome, since they require Content-Length headers see( [bug #40344](http://code.google.com/p/chromium/issues/detail?id=40344))

11
volume.md Normal file

@ -0,0 +1,11 @@
A Pan.do/ra Volume can have 2 structures, if you run a pad.ma like footage site it looks like this:
```
A/A Video/A Video.ogv
O/Other Video/Other Video.dv
```
The first level can also be something else than first letter. The second level name is used as title during import.
If you run a site with external metadata a volume has one more level with author name as sort string:
```
L/Lastname, Firstname/Title (Year)/Title[.Part X].ext
```