Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bobmagicii/presidential-document-archive
A little site that shows how many presidential documents have been signed per president per month, and well as showing recent documents so you can keep up with what MaybeYourPresident is doing. Also can archive the documents locally if you fear the Federal Register getting gagged next.
https://github.com/bobmagicii/presidential-document-archive
archive documents mysql php71 president
Last synced: 10 days ago
JSON representation
A little site that shows how many presidential documents have been signed per president per month, and well as showing recent documents so you can keep up with what MaybeYourPresident is doing. Also can archive the documents locally if you fear the Federal Register getting gagged next.
- Host: GitHub
- URL: https://github.com/bobmagicii/presidential-document-archive
- Owner: bobmagicii
- License: bsd-2-clause
- Created: 2017-01-24T18:33:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-20T22:18:59.000Z (almost 8 years ago)
- Last Synced: 2024-11-06T02:04:15.084Z (about 2 months ago)
- Topics: archive, documents, mysql, php71, president
- Language: PHP
- Homepage:
- Size: 842 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Executive Order Archive
A little site to display how many orders per day Trump is signing without any
checks and balances.Public Accessible Version: http://pda.opsat.net
None of the data sources I have found so far actually update daily, but it will
be good enough.# Local Dev Setup
## Install dependencies.
This is handled by Composer. Here is an example if your composer in installed
system wide as it should be.```
> composer install
```## Configure Database Connection
Create an empty database in MySQL with access.
Create file `conf/database.conf.php` and copy paste the following example into
it, changing the Hostname, Username, Password, and Database, to values relevant
to your system. Leave everything else about this alone.```php
[
'Type' => 'mysql',
'Hostname' => 'server',
'Username' => 'user',
'Password' => 'pass',
'Database' => 'dbname'
]
]);
```## Set Up Database
This is handled by Phinx, which was installed by Composer earlier. Run the
migrate command and all the tables will be setup in the database automagically.```
> vendor\bin\phinx migrate
```## Importing Data
You're gonna want data, too. This will hit the public government server to fetch
all of the available data it can that is relevant to this application. It will
also cache a copy of the data as they gave it to us in the `cache` directory.
PDF versions will also end up in the `archive` directory.To get daily updates, you would want to set this up to cron.
```
> php bin\fetch-federal-register.php run
```To get the historical data (which you will want, for the site to be useful) you
will have to import them president by president. It takes about 2hr per, as I
have it throttled so that the feds don't think you are cybering them.```
> php bin\fetch-federal-register.php president clinton
> php bin\fetch-federal-register.php president bushjr
> php bin\fetch-federal-register.php president obama
> php bin\fetch-federal-register.php president trump
```These are the presidents the Federal Register has exposed as something queryable
with their API, and it was more than enough to do its job for anyone with modern
memories.## Test HTTP Server
If you are not not running this on a real server you can pop the PHP test server
up locally to test the app.```
> php -S localhost:80 -t www
```Then you just have to hit up `http://localhost` to test.