Skip to content

Commit

Permalink
Added lang to API and image paths
Browse files Browse the repository at this point in the history
  • Loading branch information
npanuhin committed Dec 17, 2023
1 parent 548d992 commit 19c0d37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1 align="center">Bing Wallpaper Archive</h1>

<div align="center">
<a id="last_image_link" href="https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-17.jpg">
<img id="last_image" title="Bohemian waxwings perched on a branch, Canada" alt="Bohemian waxwings perched on a branch, Canada" src="https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-17.jpg">
<a id="last_image_link" href="https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-17.jpg">
<img id="last_image" title="Bohemian waxwings perched on a branch, Canada" alt="Bohemian waxwings perched on a branch, Canada" src="https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-17.jpg">
<img id="last_image_badge" alt="Last image: 2023-12-17" src="https://img.shields.io/badge/Last_image-2023--12--17-informational?style=flat">
</a>
</div>
Expand Down
16 changes: 8 additions & 8 deletions api/US/us.json → api/US/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -50877,7 +50877,7 @@
"description": "The Sahara spans over 3 million square miles of North Africa, covering large parts of various countries including Algeria, Egypt, Morocco, Sudan, and Tunisia. Vast sand dunes, rocky plateaus, and occasional oases create a landscape like no other. Although it is the largest hot desert in the world, the Sahara supports drought-resistant plants like acacia and palm trees, and hardy animals such as camels and fennec foxes. Intriguing features include its shifting sand dunes, pictured in today's image, some of which are over 500 feet high. Ancient rock art and fossils have also been discovered here, providing insights into early civilizations and prehistoric creatures. Sandstorms are common, shaping the ever-changing scenery and adding to the mystique of this natural wonder.",
"date": "2023-12-10",
"bing_url": "https://bing.com/th?id=OHR.SaharaDunes_EN-US0324387398_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-10.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-10.jpg"
},
{
"title": "Winter at Huangshan, China",
Expand All @@ -50887,7 +50887,7 @@
"description": "Happy International Mountain Day! In celebration of highlands, we're visiting the dramatic landscape of Huangshan—the Yellow Mountains—of eastern China's Anhui province. A UNESCO World Heritage Site, Huangshan has been described as 'the loveliest mountain of China' and has inspired artists and writers throughout history. Composed of granite that formed 140 million years ago, its peaks emerge from seas of clouds, rising to 6,115 feet at its highest point, Lotus Peak. Visitors come here to experience breathtaking rock formations, pine trees, hot springs, and captivating winter landscapes. So, let's climb high, dream big, and protect our mountains!",
"date": "2023-12-11",
"bing_url": "https://bing.com/th?id=OHR.MountainDayChina_EN-US0394775210_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-11.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-11.jpg"
},
{
"title": "Poinsettias",
Expand All @@ -50897,7 +50897,7 @@
"description": "During the holiday season, poinsettias brighten up homes in suitably festive coloring, serving as symbols of goodwill. December 12 marks National Poinsettia Day, a special occasion to celebrate this holiday favorite. The plant was introduced to the US by Joel Roberts Poinsett, a botanist and former minister to Mexico who died on this day in 1851. Poinsettias can be found growing in the wild from Mexico to Guatemala. The ancestors of the modern, commercially available version have been traced to the Mexican state of Guerrero. The crimson-leaved plant was used by the Aztecs as a red dye and as a fever-reducing medicine.",
"date": "2023-12-12",
"bing_url": "https://bing.com/th?id=OHR.Poinsettia_EN-US0450019921_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-12.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-12.jpg"
},
{
"title": "Traditional rorbu houses, Svolvaer, Lofoten Islands, Norway",
Expand All @@ -50907,7 +50907,7 @@
"description": "Housed in the Arctic Circle, Norway's Lofoten Islands are a crossroads of traditional life and modern industry. One of two towns in Lofoten, Svolvaer boasts a long history as a fishing village. Before it became a town of its own, it was part of the town of Vågan, where people have lived for over 1,000 years. Beyond fishing, it also serves as a sanctuary for travelers looking for a peaceful getaway, with as many as 200,000 visitors in a single year. The traditional rorbu houses, built on poles over water, add a distinctive layer of charm to the town. These cabins were once made for traveling fishermen and have now been refurbished to meet contemporary tastes.",
"date": "2023-12-13",
"bing_url": "https://bing.com/th?id=OHR.LofotenRorbu_EN-US1036629496_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-13.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-13.jpg"
},
{
"title": "Boreal owl, Saskatchewan, Canada",
Expand All @@ -50917,7 +50917,7 @@
"description": "In the world of birdwatching, the Christmas Bird Count, first held back in 1900, is a highlight of the year. The original bird count involved just 27 people spread over 25 locations in the US and Canada. Since then, the annual bird census has grown exponentially, with participants in more than 2,360 locations across various countries.\nIn North America's coniferous forests lives a tiny bird of prey—the boreal owl. The small brown and white-flecked raptor is shy and keeps well hidden from our view. Despite its compact size, it is a formidable hunter, feeding on small mammals, voles, and birds. With dark plumage and expressive eyes, it strikes a captivating figure in the moonlit canopy, intriguing bird enthusiasts and researchers. Any birder would be fortunate to spot one during their Christmas Bird Count.",
"date": "2023-12-14",
"bing_url": "https://bing.com/th?id=OHR.BorealOwl_EN-US1112219806_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-14.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-14.jpg"
},
{
"title": "SantaPark in Rovaniemi, Lapland, Finland",
Expand All @@ -50927,7 +50927,7 @@
"description": "Deep in the snowy landscape of Finnish Lapland is a city that claims to be the official hometown of Santa Claus. Rovaniemi is a gateway to the Arctic Circle and a destination where reality and folklore merge. Visitors can watch the Northern Lights, explore the Arctic wilderness, and experience the magic of Christmas at various Santa-themed attractions, including SantaPark, an underground theme park designed to emulate the cavern home of the man himself, and the Santa Claus Village. The entrance to SantaPark, lit by glowing lights, is pictured on our homepage today. Other attractions in Rovaniemi include a hotel built from snow and ice, a popular ski resort, and horse sleigh rides around a vast frozen lake.",
"date": "2023-12-15",
"bing_url": "https://bing.com/th?id=OHR.SantaPark_EN-US8274997583_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-15.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-15.jpg"
},
{
"title": "Guild houses of Grand-Place, Brussels, Belgium",
Expand All @@ -50937,7 +50937,7 @@
"description": "Located in the heart of Belgium, Brussels is a vibrant capital city that combines rich history with a modern, cosmopolitan feel. Famous for its architecture and listed as a UNESCO World Heritage Site, the Grand-Place of Brussels exudes an air of grandeur with its ornate guildhalls and centuries-old buildings.\nMost of this central square was destroyed in a bombardment by French troops in 1695. Thanks to reconstructions in the following decades, the square today showcases a harmonious blend of Gothic, Baroque, and Louis XIV architectural styles. Charming in every season, the Grand-Place hosts a bustling flower market in the summer and transforms into a magical winter wonderland during the holidays.",
"date": "2023-12-16",
"bing_url": "https://bing.com/th?id=OHR.GrandPlaceXmas_EN-US8451269457_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-16.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-16.jpg"
},
{
"title": "Bohemian waxwings perched on a branch, Canada",
Expand All @@ -50947,6 +50947,6 @@
"description": "Among their feathered friends, Bohemian waxwings cut striking figures with their pointed crests, 'blushing' faces, and velvety gray plumage with splashes of color. Large groups wander across the northern US and Canada in search of food, swooping on trees and shrubs to find fruit. In winter, they feast upon cotoneaster, juniper, and rowan berries. As spring casts its spell, these nomads settle down for the breeding season. The female waxwings craft the nests, laying two to six bluish-gray eggs, and hatchlings are fed a diet of insects and fruits by both parents. One can easily spot these sociable birds, as they often gather in chirpy flocks in North America and Eurasia.",
"date": "2023-12-17",
"bing_url": "https://bing.com/th?id=OHR.WinterWaxwings_EN-US8520915413_UHD.jpg",
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/images/2023-12-17.jpg"
"url": "https://storage.googleapis.com/npanuhin-bing-wallpaper-archive/US/en/2023-12-17.jpg"
}
]
4 changes: 2 additions & 2 deletions src/Region.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class Region:
def __init__(self, region):
self.lang, self.country = map(str.lower, region.split('-'))
self.path = mkpath(os.path.dirname(__file__), '../api', self.country.upper())
self.api_path = mkpath(self.path, self.country.lower() + '.json')
self.api_path = mkpath(self.path, self.lang.lower() + '.json')

os.makedirs(self.path, exist_ok=True)

self.gcloud_images_path = mkpath(self.country.upper(), 'images')
self.gcloud_images_path = mkpath(self.country.upper(), self.lang.lower())

@property
def mkt(self):
Expand Down

0 comments on commit 19c0d37

Please sign in to comment.