Skip to content

Commit

Permalink
Merge pull request #39 from karllhughes/master
Browse files Browse the repository at this point in the history
Fixes date/location parsing from Papercall
  • Loading branch information
heiglandreas authored Jun 19, 2019
2 parents 2e6bdb8 + a06d7d7 commit ceb6fa4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@ alternate version:

## Usage

# Install Composer dependencies (if not using `composer create-project` command
composer install

# Copy and customize the .ini file:
cp config/callingallpapers.ini.dist config/callingallpapers.ini

# List valid commands
./bin/callinallpapers list

2 changes: 1 addition & 1 deletion src/Parser/PapercallIo/EventEndDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function parse(DOMDocument $dom, DOMNode $node, Cfp $cfp) : Cfp
}

$locationTimeString = trim($titlePath->item(0)->textContent);
$locationTime = explode(' - ', $locationTimeString);
$locationTime = explode(PHP_EOL, $locationTimeString);

if (! isset($locationTime[1])) {
return $cfp;
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/PapercallIo/EventStartDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function parse(DOMDocument $dom, DOMNode $node, Cfp $cfp) : Cfp
}

$location = trim($titlePath->item(0)->textContent);
$location = explode(' - ', $location);
$location = explode(PHP_EOL, $location);

if (! isset($location[1])) {
return $cfp;
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/PapercallIo/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function parse(DOMDocument $dom, DOMNode $node, Cfp $cfp) : Cfp
}

$location = trim($titlePath->item(0)->textContent);
$location = explode(' - ', $location);
$location = explode(PHP_EOL, $location);
$cfp->location = $location[0];

return $cfp;
Expand Down
2 changes: 1 addition & 1 deletion tests/Parser/PapercallIo/_assets/conf4.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<h1 class="subheader__title">BSides Wellington 2017</h1>
<h1 class="subheader__subtitle">
Wellington, NZ
- November 23, 2017, November 24, 2017
November 23, 2017, November 24, 2017
</h1>
<a target="_blank" href="https://bsides.nz/">https://bsides.nz/</a><br>
<span>Tags: Tool release, Open source, Devsecops, Devops, New zealand, Iot, Zero-day, Hardware, Education, Mobile, Webapp, Software, Network, Technology, People, Managing, Hunting, Defending, Building, Breaking, Security culture, Awareness, Risk management, Business risk, Cybersecurity, Contempt culture, Diversity, Red team, Purple team, Blue team, Defence, Strategy</span>
Expand Down
6 changes: 3 additions & 3 deletions tests/Parser/PapercallIo/_assets/conf5.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@papercall_io" />
<meta name="twitter:title" content="PaperCall.io - India Dreamin" />
<meta name="twitter:description" content="Mark your calendars for September 30th, 2017 and gear up for a celebration of Salesforce - the Indian way!
<meta name="twitter:description" content="Mark your calendars for September 30th, 2017 and gear up for a celebration of Salesforce - the Indian way!
India Dreamin is a community led, community run event for professionals around Salesforce. Put together by the vibrant Indian Salesforce community, this event is open for all Salesforce ..." />
<meta name="twitter:image" content="https://papercallio-production.s3.amazonaws.com/uploads/event/logo/641/ID_Logo.png" />

Expand Down Expand Up @@ -159,7 +159,7 @@
<h1 class="subheader__title">India Dreamin</h1>
<h1 class="subheader__subtitle">
G.L.Bajaj Institute of Technology &amp; Management, Plot No. 2, Knowledge Park III, Distt. G.B.Nagar, Greater Noida, Uttar Pradesh 201306
- September 30, 2017
September 30, 2017
</h1>
<a target="_blank" href="http://www.indiadreamin.in/">http://www.indiadreamin.in/</a><br>
</div>
Expand Down

0 comments on commit ceb6fa4

Please sign in to comment.