mirror of
https://github.com/akaessens/NoFbEventScraper
synced 2025-06-05 23:29:13 +02:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
c43911fc77 | |||
3cbfc9b9c1 | |||
71169dae76 | |||
5b412733b4 | |||
a3f2990c61 | |||
1c112f3e4e | |||
2faf8aa003 | |||
643ac62788 | |||
d5e12c4d88 | |||
320d1787aa | |||
c7a4d9b027 |
40
CHANGELOG.md
Normal file
40
CHANGELOG.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Changelog
|
||||||
|
## v0.3.3 (9)
|
||||||
|
- Update about section with download and changelog information.
|
||||||
|
- Improve high-res preview scraping.
|
||||||
|
- Fix potential crash on calendar intent.
|
||||||
|
## v0.3.2 (8)
|
||||||
|
- Add german translation.
|
||||||
|
- Decrease MinSDK to 23 (Android 6.0).
|
||||||
|
- Replace Date implementation.
|
||||||
|
- Enable Dark Mode for WebViews.
|
||||||
|
- Add high-res preview for www prefix.
|
||||||
|
## v0.3.1 (7)
|
||||||
|
- Fix invalid default uri.
|
||||||
|
- Update about section.
|
||||||
|
## v0.3.0 (6)
|
||||||
|
- Rework help and about.
|
||||||
|
- Add settings with URL prefix selector.
|
||||||
|
- Add Maps button for location.
|
||||||
|
- Disable text field inputs - all fields can be edited in the calendar app.
|
||||||
|
- Change date/time format to RFC standard.
|
||||||
|
- Minor interface changes.
|
||||||
|
- Code cleanup and refactoring.
|
||||||
|
- Add code documentation.
|
||||||
|
## v0.2.2 (5)
|
||||||
|
- Fix for event links with querystrings.
|
||||||
|
- New icon and banner as default toolbar image.
|
||||||
|
## v0.2.1 (4)
|
||||||
|
- Fixes for new design.
|
||||||
|
- New button layout.
|
||||||
|
- Improve input error display.
|
||||||
|
## v0.2.0 (3)
|
||||||
|
- Fix for timezone calculation.
|
||||||
|
- Material design Interface, will be improved further.
|
||||||
|
- Display the event picture in the toolbar.
|
||||||
|
## v0.1.1 (2)
|
||||||
|
- Added help and reports section.
|
||||||
|
- Fix for some locations not scraped correctly.
|
||||||
|
- Resolve fb-internal links.
|
||||||
|
## v0.1.0 (1)
|
||||||
|
- Initial release.
|
31
README.md
31
README.md
@ -1,20 +1,37 @@
|
|||||||

|
[](https://github.com/akaessens/NoFbEventScraper/actions)
|
||||||
|
[](https://github.com/akaessens/NoFbEventScraper/blob/master/LICENSE)
|
||||||
|
[](https://github.com/akaessens/NoFbEventScraper/releases/latest)
|
||||||
|
[](https://f-droid.org/en/packages/com.akdev.nofbeventscraper)
|
||||||
|
|
||||||
|
|
||||||
<img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/featureGraphic.png" alt="Feature Graphic" width="max-width">
|
<img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/featureGraphic.png" alt="Feature Graphic" width="max-width">
|
||||||
|
|
||||||
# NoFb Event Scraper
|
# Description
|
||||||
|
|
||||||
This application was developed to be used without a facebook account.
|
This application was developed to be used without a Facebook account.
|
||||||
|
|
||||||
Therefore it does not use the facebook API.
|
Therefore it does not use the Facebook API.
|
||||||
Instead it opens the facebook event URI and downloads the website source code.
|
Instead it opens the Facebook event URI and downloads the website source code.
|
||||||
This source contains the information which is used to create a calendar entry.
|
This source contains the information which is used to create a calendar entry.
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
Currently this application is in the submitting process to FDroid. see also [#2](/../../issues/2).
|
|
||||||
|
|
||||||
Until it is published at FDroid, use [release v0.3.1](https://github.com/akaessens/NoFbEventScraper/releases/download/v0.3.1/app-release.apk).
|
<a href="https://f-droid.org/en/packages/com.akdev.nofbeventscraper">
|
||||||
|
<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
# Building
|
||||||
|
|
||||||
|
This Android app is written in Java and is using the Gradle build system. To compile it, i recommend using Android Studio.
|
||||||
|
```
|
||||||
|
./gradlew build
|
||||||
|
```
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
|
|
||||||
<img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" alt="Screenshot 1" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" alt="Screenshot 2" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" alt="Screenshot 3" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" alt="Screenshot 4" width="200">
|
<img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" alt="Screenshot 1" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" alt="Screenshot 2" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" alt="Screenshot 3" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" alt="Screenshot 4" width="200">
|
||||||
|
|
||||||
|
# Donations
|
||||||
|
I develop this application in my free time. If you like it, you can donate at <a href="https://www.paypal.me/andreaskaessens">PayPal</a>.
|
||||||
|
|
||||||
|
<a title="PayPal" href="https://www.paypal.me/andreaskaessens"><img src="https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png" height="75" /></a>
|
@ -8,8 +8,8 @@ android {
|
|||||||
applicationId "com.akdev.nofbeventscraper"
|
applicationId "com.akdev.nofbeventscraper"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 8
|
versionCode 9
|
||||||
versionName "0.3.2"
|
versionName "0.3.3"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,8 @@ public class FbEvent {
|
|||||||
*/
|
*/
|
||||||
static String dateTimeToString(Date date) {
|
static String dateTimeToString(Date date) {
|
||||||
try {
|
try {
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("E, dd MMM yyyy HH:mm z", Locale.getDefault());
|
SimpleDateFormat formatter = new SimpleDateFormat("E, dd MMM yyyy HH:mm z",
|
||||||
|
Locale.getDefault());
|
||||||
return formatter.format(date);
|
return formatter.format(date);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return "";
|
return "";
|
||||||
|
@ -84,6 +84,7 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
|
|||||||
/**
|
/**
|
||||||
* Strips the event location from the json string.
|
* Strips the event location from the json string.
|
||||||
* This can be a name only or a complete postal address.
|
* This can be a name only or a complete postal address.
|
||||||
|
*
|
||||||
* @param location_json JSON formatted string
|
* @param location_json JSON formatted string
|
||||||
* @return String representation of the location.
|
* @return String representation of the location.
|
||||||
*/
|
*/
|
||||||
@ -164,6 +165,7 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Read a single field from a JSONObject
|
* Read a single field from a JSONObject
|
||||||
|
*
|
||||||
* @param reader JSONObject to read from
|
* @param reader JSONObject to read from
|
||||||
* @param field Which field to read
|
* @param field Which field to read
|
||||||
* @return String of the value of the field or empty string
|
* @return String of the value of the field or empty string
|
||||||
@ -180,6 +182,7 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
|
|||||||
/**
|
/**
|
||||||
* Started by scraper.execute().
|
* Started by scraper.execute().
|
||||||
* Gets the HTML doc from the input string and scrapes the event information from it.
|
* Gets the HTML doc from the input string and scrapes the event information from it.
|
||||||
|
*
|
||||||
* @param voids
|
* @param voids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -212,8 +215,8 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// possibly get higher res image from event header
|
// possibly get higher res image from event header
|
||||||
image_url = document.getElementsByClass("scaledImageFitWidth")
|
image_url = document.select("div[id=event_header_primary]")
|
||||||
.first().attr("src");
|
.select("img").first().attr("src");
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// ignore
|
// ignore
|
||||||
@ -247,6 +250,7 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
|
|||||||
/**
|
/**
|
||||||
* When scraping is finished, main activity will be updated.
|
* When scraping is finished, main activity will be updated.
|
||||||
* If an error occurred, main activity is given an error string.
|
* If an error occurred, main activity is given an error string.
|
||||||
|
*
|
||||||
* @param aVoid
|
* @param aVoid
|
||||||
*/
|
*/
|
||||||
protected void onPostExecute(Void aVoid) {
|
protected void onPostExecute(Void aVoid) {
|
||||||
|
@ -174,8 +174,11 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
// prepend url in description
|
// prepend url in description
|
||||||
String desc = event.url + "\n\n" + event.description;
|
String desc = event.url + "\n\n" + event.description;
|
||||||
intent.putExtra(CalendarContract.Events.DESCRIPTION, desc);
|
intent.putExtra(CalendarContract.Events.DESCRIPTION, desc);
|
||||||
|
|
||||||
|
if (intent.resolveActivity(getPackageManager()) != null) {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -60,7 +60,8 @@
|
|||||||
app:layout_anchorGravity="bottom|end"
|
app:layout_anchorGravity="bottom|end"
|
||||||
app:icon="@drawable/ic_content_paste"
|
app:icon="@drawable/ic_content_paste"
|
||||||
android:text="@android:string/paste"
|
android:text="@android:string/paste"
|
||||||
android:tooltipText="@string/tooltip_paste"/>
|
android:tooltipText="@string/tooltip_paste"
|
||||||
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
<include layout="@layout/content_main" />
|
<include layout="@layout/content_main" />
|
||||||
|
|
||||||
|
@ -4,8 +4,11 @@
|
|||||||
<h3>Open Source</h3>
|
<h3>Open Source</h3>
|
||||||
<p>Der Quellcode für diese Anwendung ist bei <a href=" https://github.com/akaessens/NoFbEventScraper">GitHub</a> verfügbar.<strong><br /></strong></p>
|
<p>Der Quellcode für diese Anwendung ist bei <a href=" https://github.com/akaessens/NoFbEventScraper">GitHub</a> verfügbar.<strong><br /></strong></p>
|
||||||
<p>Wenn Sie auf ein Problem stoßen, melden Sie es mir bitte anonym über den <a href="https://gitreports.com/issue/akaessens/NoFbEventScraper">Bugtracker</a> oder direkt bei <a href="https://github.com/akaessens/NoFbEventScraper/issues">GitHub</a>.</p>
|
<p>Wenn Sie auf ein Problem stoßen, melden Sie es mir bitte anonym über den <a href="https://gitreports.com/issue/akaessens/NoFbEventScraper">Bugtracker</a> oder direkt bei <a href="https://github.com/akaessens/NoFbEventScraper/issues">GitHub</a>.</p>
|
||||||
|
<h3>Updates</h3>
|
||||||
|
<p>Diese App ist bei <a href="https://f-droid.org/de/packages/com.akdev.nofbeventscraper">F-Droid</a> zum Download verfügbar. Das Änderungsprotokoll ist auf <a href="https://github.com/akaessens/NoFbEventScraper/blob/master/CHANGELOG.md">GitHub</a> verfügbar.</p>
|
||||||
|
<p><a href="https://f-droid.org/en/packages/com.akdev.nofbeventscraper"> <img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75" /> </a></p>
|
||||||
<h3>Rechtliches</h3>
|
<h3>Rechtliches</h3>
|
||||||
<p>Diese Anwendung ist für das Speichern einzelner, öffentlich zugänglicher Veranstaltungen in einem persönlichen Kalender vorgesehen. Verwenden Sie sie nicht zur automatischen Datenerfassung und halten Sie sich an die <a href="http://www.facebook.com/apps/site_scraping_tos_terms.php">Bedingungen für die automatische Datenerfassung</a> von Facebook.</p>
|
<p>Diese Anwendung ist für das Speichern einzelner, öffentlich zugänglicher Veranstaltungen in einem persönlichen Kalender vorgesehen. Verwenden Sie sie nicht zur automatischen Datenerfassung und halten Sie sich an die <a href="http://www.facebook.com/apps/site_scraping_tos_terms.php">Bedingungen für die automatische Datenerfassung</a> von Facebook.</p>
|
||||||
<h3>Spenden</h3>
|
<h3>Spenden</h3>
|
||||||
<p>Ich entwickle diese Anwendung in meiner Freizeit. Wenn sie Ihnen gefällt, können Sie bei <a href="https://www.paypal.me/andreaskaessens">PayPal</a> spenden.</p>
|
<p>Ich entwickle diese Anwendung in meiner Freizeit. Wenn sie Ihnen gefällt, können Sie bei <a href="https://www.paypal.me/andreaskaessens">PayPal</a> spenden.</p>
|
||||||
<p><a title="PayPal" href="https://www.paypal.me/andreaskaessens"><img src="https://www.paypalobjects.com/webstatic/de_DE/i/de-pp-logo-100px.png" /></a></p>
|
<p><a title="PayPal" href="https://www.paypal.me/andreaskaessens"><img src="https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png" height="75" /></a></p>
|
@ -4,8 +4,11 @@
|
|||||||
<h3>Open Source</h3>
|
<h3>Open Source</h3>
|
||||||
<p>The source code for this application is available at <a href=" https://github.com/akaessens/NoFbEventScraper">GitHub</a>.<strong><br /></strong></p>
|
<p>The source code for this application is available at <a href=" https://github.com/akaessens/NoFbEventScraper">GitHub</a>.<strong><br /></strong></p>
|
||||||
<p>If you encounter an issue, please report it to me anonymously at the <a href="https://gitreports.com/issue/akaessens/NoFbEventScraper">Bugtracker</a> or directly at <a href="https://github.com/akaessens/NoFbEventScraper/issues">GitHub</a>.</p>
|
<p>If you encounter an issue, please report it to me anonymously at the <a href="https://gitreports.com/issue/akaessens/NoFbEventScraper">Bugtracker</a> or directly at <a href="https://github.com/akaessens/NoFbEventScraper/issues">GitHub</a>.</p>
|
||||||
|
<h3>Updates</h3>
|
||||||
|
<p>This application is available for download at <a href="https://f-droid.org/de/packages/com.akdev.nofbeventscraper">F-Droid</a>. The changelog is at <a href="https://github.com/akaessens/NoFbEventScraper/blob/master/CHANGELOG.md">GitHub</a>.</p>
|
||||||
|
<p><a href="https://f-droid.org/en/packages/com.akdev.nofbeventscraper"> <img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75" /> </a></p>
|
||||||
<h3>Legal</h3>
|
<h3>Legal</h3>
|
||||||
<p>This application is intended for saving single, publicly available events into a personal calendar. Do not use it to automatically collect data and comply with Facebook's <a href="http://www.facebook.com/apps/site_scraping_tos_terms.php">Automated Data Collection Terms</a>.</p>
|
<p>This application is intended for saving single, publicly available events into a personal calendar. Do not use it to automatically collect data and comply with Facebook's <a href="http://www.facebook.com/apps/site_scraping_tos_terms.php">Automated Data Collection Terms</a>.</p>
|
||||||
<h3>Donations</h3>
|
<h3>Donations</h3>
|
||||||
<p>I develop this application in my free time. If you like it, you can donate at <a href="https://www.paypal.me/andreaskaessens">PayPal</a>.</p>
|
<p>I develop this application in my free time. If you like it, you can donate at <a href="https://www.paypal.me/andreaskaessens">PayPal</a>.</p>
|
||||||
<p><a title="PayPal" href="https://www.paypal.me/andreaskaessens"><img src="https://www.paypalobjects.com/webstatic/de_DE/i/de-pp-logo-100px.png" /></a></p>
|
<p><a title="PayPal" href="https://www.paypal.me/andreaskaessens"><img src="https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png" height="75" /></a></p>
|
21
create_changelog.sh
Executable file
21
create_changelog.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
changelog_location="fastlane/metadata/android/en-US/changelogs"
|
||||||
|
count_txt=$(ls -r $changelog_location/*.txt | wc -l)
|
||||||
|
count_tag=$(git tag | wc -l)
|
||||||
|
|
||||||
|
if (( count_txt != count_tag )); then
|
||||||
|
echo "Tag count and txt-file count not matching."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "# Changelog" > CHANGELOG.md
|
||||||
|
|
||||||
|
for i in $(seq "$count_txt" -1 1)
|
||||||
|
do
|
||||||
|
tag=$(git tag | sed "$i!d")
|
||||||
|
|
||||||
|
echo "## $tag ($i)" >> CHANGELOG.md
|
||||||
|
cat $changelog_location/"$i".txt >> CHANGELOG.md
|
||||||
|
|
||||||
|
done
|
@ -1 +1 @@
|
|||||||
Initial release.
|
- Initial release.
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Added help and reports section.
|
- Added help and reports section.
|
||||||
Fix for some locations not scraped correctly.
|
- Fix for some locations not scraped correctly.
|
||||||
Resolve fb-internal links.
|
- Resolve fb-internal links.
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Fix for timezone calculation.
|
- Fix for timezone calculation.
|
||||||
Material design Interface, will be improved further.
|
- Material design Interface, will be improved further.
|
||||||
Display the event picture in the toolbar.
|
- Display the event picture in the toolbar.
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Fixes for new design.
|
- Fixes for new design.
|
||||||
New button layout.
|
- New button layout.
|
||||||
Improve input error display.
|
- Improve input error display.
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
Fix for event links with querystrings.
|
- Fix for event links with querystrings.
|
||||||
New icon and banner as default toolbar image.
|
- New icon and banner as default toolbar image.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Rework help and about.
|
- Rework help and about.
|
||||||
Add settings with URL prefix selector.
|
- Add settings with URL prefix selector.
|
||||||
Add Maps button for location.
|
- Add Maps button for location.
|
||||||
Disable text field inputs - all fields can be edited in the calendar app.
|
- Disable text field inputs - all fields can be edited in the calendar app.
|
||||||
Change date/time format to RFC standard.
|
- Change date/time format to RFC standard.
|
||||||
Minor interface changes.
|
- Minor interface changes.
|
||||||
Code cleanup and refactoring.
|
- Code cleanup and refactoring.
|
||||||
Add code documentation.
|
- Add code documentation.
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
Fix invalid default uri.
|
- Fix invalid default uri.
|
||||||
Update about section.
|
- Update about section.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Add german translation.
|
- Add german translation.
|
||||||
Decrease MinSDK to 23 (Android 6.0).
|
- Decrease MinSDK to 23 (Android 6.0).
|
||||||
Replace Date implementation.
|
- Replace Date implementation.
|
||||||
Enable Dark Mode for WebViews.
|
- Enable Dark Mode for WebViews.
|
||||||
Add high-res preview for www prefix.
|
- Add high-res preview for www prefix.
|
||||||
|
3
fastlane/metadata/android/en-US/changelogs/9.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/9.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- Update about section with download and changelog information.
|
||||||
|
- Improve high-res preview scraping.
|
||||||
|
- Fix potential crash on calendar intent.
|
Reference in New Issue
Block a user