Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abarichello/cp-swf
Interactive archive of Club Penguin SWFs by year
https://github.com/abarichello/cp-swf
club-penguin club-penguin-swfs clubpenguin flash swf
Last synced: 10 days ago
JSON representation
Interactive archive of Club Penguin SWFs by year
- Host: GitHub
- URL: https://github.com/abarichello/cp-swf
- Owner: abarichello
- License: gpl-3.0
- Created: 2020-05-23T01:31:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-11-22T13:24:53.000Z (12 months ago)
- Last Synced: 2024-02-17T07:35:06.973Z (9 months ago)
- Topics: club-penguin, club-penguin-swfs, clubpenguin, flash, swf
- Language: Elm
- Homepage: https://cpswf.barichello.me
- Size: 47.9 KB
- Stars: 30
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [cp-swf](https://cpswf.barichello.me/)
An interactive archive of Club Penguin SWFs by year.
# About
## ArchiveThe SWF archive is included as a git submodule, the repository can be found here: [cp-swf-archive](https://gitlab.com/BARICHELLO/cp-swf-archive).
Feel free to contribute by adding any missing files.## Flash
This website uses [Ruffle](https://github.com/ruffle-rs/ruffle) so a Flash installation isn't necessary
# How it works
First a JSON file with the structure of the SWF folder is generated with `tree -J cp-swf-archive`, example:
```json
[
{"type":"directory","name":".","contents":[
{"type":"directory","name":"2017","contents":[
{"type":"directory","name":"default","contents":[
{"type":"file","name":"attic.swf"},
// ...
]},
{"type":"directory","name":"unknown","contents":[
{"type":"file","name":"party10solo.swf"},
// ...
]}
{"type":"report","directories":9,"files":98}
]
```Then this JSON gets decoded into the following recursive custom type:
```elm
type alias Archive =
List Nodetype Node
= Directory { name : String, contents : List Node }
| File String
| Report { directories : Int, files : Int }
```This gives the necessary tree structure to represent the files, their hierarchy and the total number of files and directories.
# Compiling and Debug
1. [Install Elm](https://guide.elm-lang.org/install/elm.html)
1. `git clone --recursive [email protected]:aBARICHELLO/cp-swf.git`
1. Using elm-live: `elm-live src/Main.elm --start-page=index.html -- --output=main.js --debug`
1. Update local archive file by running `tree -J cp-swf-archive > cp-swf-archive/archive.json`
1. To use debug mode edit the flag in `index.html` to `true`, this redirects all archive requests to `localhost:8000`