Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
chore: Merge branch dev to main (#7)
Browse files Browse the repository at this point in the history
### Features

* **twitter:** 

Full app wide Monet theme (a12+)

Grey theme shade (replacement of lights out)

original Bird splash screen

Bird vector on toolbar

Strings changed to Twitter brand like Tweet, Retweet

App name changed to Twitter

* scs

---------

Co-authored-by: IndusAryan <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
  • Loading branch information
3 people authored Feb 4, 2024
1 parent ce483bf commit f94de5b
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 31 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.10.0-dev.1](https://github.com/IndusAryan/twitter-patches/compare/v1.9.4...v1.10.0-dev.1) (2024-02-04)


### Features

* **twitter:** more strings ([37d9b95](https://github.com/IndusAryan/twitter-patches/commit/37d9b9551103a2a280a303647d3fa7ffbb029b02))

## [1.9.4](https://github.com/IndusAryan/twitter-patches/compare/v1.9.3...v1.9.4) (2024-02-04)


Expand Down
81 changes: 52 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,65 @@
# 👋🧩 ReVanced Patches template
## Patches for twitter:

This is a template for creating a new ReVanced Patches repository.
The repository can have multiple patches, and patches from other repositories can be used together.
```kotlin
⦿ App wide Material Theme (replaces Dim)
⦿ Grey Theme (replaces LightsOut)
⦿ OG Twitter name and in app branding
⦿ Bird Splash screen and toolbar
⦿ Three Icon sets
⦿ Hide promoted users and AdBlock (from revanced official)
```

For an example repository, see [ReVanced Patches](https://github.com/revanced/revanced-patches).
## Usage

## 🚀 Get started
To use these patches, follow the steps below:

To start using this template, follow these steps:
1. Make `IndusAryan` the organization for your Revanced app.
2. Set `twitter-patches` as the source for your patches.

1. [Create a new repository using this template](https://github.com/new?template_name=revanced-patches-template&template_owner=ReVanced)
2. Set up the [build.gradle.kts](build.gradle.kts) file (Match the [group of the project](build.gradle.kts#L8), [manifest attributes](build.gradle.kts#L35-L43), and the [POM](build.gradle.kts#L84-L106) that will be published to yours)
3. Update the dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file
4. [Add a secret](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to indus repository named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L47) containing a GitHub access token with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication)
5. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary of the patches that are included in the repository)
<div style="display:flex; justify-content:space-between;">
<img src="screenshots/raw1.jpg" alt="usage" width="200" />
</div>

🎉 You are now ready to start creating patches!
## Warning:
Only use 1 icon patch and deselect other two otherwise; last applied patch will be used.

## 🔘 Optional steps
## Icons
<div style="display:flex; justify-content:space-between;">
<img src="screenshots/raw2.jpg" alt="icons" width="300" />
</div>

You can also add the following things to the repository:
## Screenshots

- [Issue templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)[^2]
- Contribution guidelines[^3]
- Documentation, if you want to publish indus patches as a library[^4]
<div style="display:flex; flex-direction:row;">
<div style="margin-right: 20px; text-align: center;">
<img src="screenshots/3.jpg" alt="grey" width="200" />
</div>

[^1]: [Example README.md file](https://github.com/ReVanced/revanced-patches/blob/main/README.md)
[^2]: [Example issue templates](https://github.com/ReVanced/revanced-patches/tree/main/.github/ISSUE_TEMPLATE)
[^3]: [Example contribution guidelines](https://github.com/ReVanced/revanced-patches/blob/main/CONTRIBUTING.md)
[^4]: [Example documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs)
<div style="margin-right: 20px; text-align: center;">
<img src="screenshots/4.jpg" alt="monet" width="200" />
</div>

## 🧑‍💻 Usage
<div style="text-align: center;">
<img src="screenshots/5.jpg" alt="other" width="200" />
</div>

In order to develop and release ReVanced Patches using this template, some things need to be considered:
<div style="text-align: center;">
<img src="screenshots/6.jpg" alt="other" width="200" />
</div>

- Development originates in feature branches. Once a feature branch is ready, it is squshed and merged into the `dev` branch
- The `dev` branch is merged into the `main` branch once it is ready for release
- Semantic versioning is used for versioning ReVanced Patches. ReVanced Patches have a public API for other patches to use
- Semantic commit messages are used for commits
- Commits on the `dev` branch and `main` branch are automatically released via the [release.yml](.github/workflows/release.yml) workflow, which is also responsible for generating the changelog and updating the version of ReVanced Patches. It is triggered by pushing to the `dev` or `main` branch. The workflow uses the `publish` task to publish the release of ReVanced Patches
- In order to build ReVanced Patches, that can be used on Android, the [`generateBundle`](build.gradle.kts#L48-L70) task needs to be run. The [`publish` task depends on the `generateBundle`](build.gradle.kts#L74-L76) task, so it will be run automatically when publishing a release.
<div style="text-align: center;">
<img src="screenshots/7.jpg" alt="other" width="200" />
</div>
</div>

## Contributing
If you would like to contribute to the project in any way better, you can PR.

## License
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](http://www.gnu.org/licenses/gpl-3.0.en.html)

These patches are fully FOSS. You can use, study, share and modify it at your will. They can be redistributed and/or modified under the terms of the [GNU General Public License](https://www.gnu.org/licenses/gpl.html) version 3 or later published by the Free Software Foundation.

---
### Info:
These patches are for educational purpose and personal usages and are safe and don't tamper with any application functionality neither they are capable of it in any way. We are not affiliated with Revanced Project.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 1.9.4
version = 1.10.0-dev.1
Binary file added screenshots/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/raw1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/raw2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/main/kotlin/indus/org/patches/twitter/XMLUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class XMLUtils(context: ResourceContext) {

private val avatarMarkerTwitterFile = context["res/drawable/avatar_marker_twitter.xml"]
private val mipmapDirectory = context["res"].resolve("mipmap-anydpi")
private val mipmapDirectoryv26 = context["res"].resolve("mipmap-anydpi-v26")
private val icLauncherTwitterXml = mipmapDirectory.resolve("ic_launcher_twitter.xml")
private val icLauncherTwitterRoundXml = mipmapDirectory.resolve("ic_launcher_twitter_round.xml")

Expand Down Expand Up @@ -156,7 +157,11 @@ class XMLUtils(context: ResourceContext) {
}

private fun updateXmlFile(xmlFile: File) {
if (!Files.isRegularFile(xmlFile.toPath())) throw PatchException("$xmlFile not found.")
val directoryToUse = if (Files.notExists(mipmapDirectory.toPath())) mipmapDirectoryv26 else mipmapDirectory

if (!Files.isDirectory(directoryToUse.toPath())) {
throw PatchException("Mipmap directory not found: $directoryToUse")
}

val content = xmlFile.readText()
val modifiedContent = content.replace(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ object OGTwitterBrand : ResourcePatch() {
"rux_landing_page_title" to "Tweet",
"tweet_fab_item" to "Tweet",
"tweet_title" to "Tweet",
"search_twitter" to "Search Twitter",
"search_hint" to "Search Twitter",
"ps__accessibility_retweet_broadcast_button" to "Retweet",
"shortcut_retweet_tweet" to "Retweet",
"social_you_retweeted" to "You retweeted",
Expand Down

0 comments on commit f94de5b

Please sign in to comment.